mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Add random horse colour and style (pattern) generation to Call Of The Wild
This commit is contained in:
parent
c96c3468f0
commit
9073aa6a6e
@ -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,11 @@ public class TamingManager extends SkillManager {
|
|||||||
entity.setHealth(entity.getMaxHealth());
|
entity.setHealth(entity.getMaxHealth());
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user