From 9073aa6a6e673a7b6a8dee2753d3566d8b907e38 Mon Sep 17 00:00:00 2001 From: dddeeefff Date: Mon, 23 Sep 2013 20:57:28 +0100 Subject: [PATCH] Add random horse colour and style (pattern) generation to Call Of The Wild --- .../java/com/gmail/nossr50/skills/taming/TamingManager.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 ac5790076..7800a1568 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -5,6 +5,7 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Ocelot; import org.bukkit.entity.Player; +import org.bukkit.entity.Horse; import org.bukkit.entity.Tameable; import org.bukkit.entity.Wolf; import org.bukkit.inventory.ItemStack; @@ -232,6 +233,11 @@ public class TamingManager extends SkillManager { entity.setHealth(entity.getMaxHealth()); break; + case HORSE: + ((Horse) entity).setColor(Horse.Color.values()[0 + Misc.getRandom().nextInt(Horse.Color.values().length)]); + ((Horse) entity).setStyle(Horse.Style.values()[0 + Misc.getRandom().nextInt(Horse.Style.values().length)]); + break; + default: break; }