Add random horse colour and style (pattern) generation to Call Of The Wild

This commit is contained in:
dddeeefff 2013-09-23 20:57:28 +01:00
parent c96c3468f0
commit 9073aa6a6e

View File

@ -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;
}