From 7f290504adfc54bddfba4429f752e8eac01336cd Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 26 Sep 2013 10:43:45 -0400 Subject: [PATCH] Set random jump strength for horses as well. --- .../com/gmail/nossr50/skills/taming/TamingManager.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index 2891760f8..7d819eb6d 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -234,10 +234,14 @@ public class TamingManager extends SkillManager { break; case HORSE: - entity.setMaxHealth(15 + Misc.getRandom().nextInt(16)); + Horse horse = (Horse) entity; + + entity.setMaxHealth(15.0 + (Misc.getRandom().nextDouble() * 15)); entity.setHealth(entity.getMaxHealth()); - ((Horse) entity).setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]); - ((Horse) entity).setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]); + 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(Misc.getRandom().nextDouble() * 2); + //TODO: setSpeed, once available break; default: