mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Add randomized Horse appearance to Call Of The Wild
This commit is contained in:
parent
b49e56c857
commit
1254ab232a
@ -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,13 @@ public class TamingManager extends SkillManager {
|
||||
entity.setHealth(entity.getMaxHealth());
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user