Add randomized Horse appearance to Call Of The Wild

This commit is contained in:
dddeeefff 2013-09-23 20:57:28 +01:00 committed by TfT_02
parent b49e56c857
commit 1254ab232a

View File

@ -5,6 +5,7 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Ocelot; import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Tameable; import org.bukkit.entity.Tameable;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -232,6 +233,13 @@ public class TamingManager extends SkillManager {
entity.setHealth(entity.getMaxHealth()); entity.setHealth(entity.getMaxHealth());
break; break;
case HORSE:
entity.setMaxHealth(15 + Misc.getRandom().nextInt(16));
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)]);
break;
default: default:
break; break;
} }