2
0
Эх сурвалжийг харах

Added minimum jump strength requirement and config option

for horses summoned with "Call of the Wild"
TfT_02 11 жил өмнө
parent
commit
f65adea2f9

+ 1 - 0
Changelog.txt

@@ -39,6 +39,7 @@ Version 1.4.08-dev
  = Fixed bug where party chat broke if the display name contained special characters
  = Fixed bug where `/addlevels all` and `/skillreset all` didn't work
  = Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
+ = Fixed bug where some horses summoned with "Call of the Wild" were unable to jump
  = Fixed bug where the /ptp request expiration time was checked wrongly - preventing players from using the command
  = Fixed bug where Hylian Luck was broken
  = Fixed bug where Snow would never drop treasures

+ 1 - 0
src/main/java/com/gmail/nossr50/config/AdvancedConfig.java

@@ -777,6 +777,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
     public int getSharpenedClawsUnlock() { return config.getInt("Skills.Taming.SharpenedClaws.UnlockLevel", 750); }
     public double getSharpenedClawsBonus() { return config.getDouble("Skills.Taming.SharpenedClaws.Bonus", 2.0D); }
 
+    public double getMinHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MinHorseJumpStrength", 0.7D); }
     public double getMaxHorseJumpStrength() { return config.getDouble("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength", 2.0D); }
 
     /* UNARMED */

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java

@@ -255,7 +255,7 @@ public class TamingManager extends SkillManager {
                     entity.setHealth(entity.getMaxHealth());
                     horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
                     horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
-                    horse.setJumpStrength(Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength()));
+                    horse.setJumpStrength(Math.max(AdvancedConfig.getInstance().getMinHorseJumpStrength(), Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength())));
                     //TODO: setSpeed, once available
                     break;
 

+ 2 - 0
src/main/resources/advanced.yml

@@ -471,7 +471,9 @@ Skills:
             Bonus: 2.0
 
         CallOfTheWild:
+            # MinHorseJumpStrength: The minimum jump strength a summoned horse must have
             # MaxHorseJumpStrength: The maximum jump strength a summoned horse can have
+            MinHorseJumpStrength: 0.7
             MaxHorseJumpStrength: 2.0
     #
     #  Settings for Unarmed