mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
Added horses to SpawnMob /spawnmob horse:<color><variant><style><chest>
This commit is contained in:
parent
ba6fd95247
commit
bf675b230e
@ -403,6 +403,75 @@ public class SpawnMob
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (type == EntityType.HORSE)
|
||||
{
|
||||
if (data.contains("donkey"))
|
||||
{
|
||||
((Horse)spawned).setVariant(Horse.Variant.DONKEY);
|
||||
}
|
||||
else if (data.contains("mule"))
|
||||
{
|
||||
((Horse)spawned).setVariant(Horse.Variant.MULE);
|
||||
}
|
||||
else if (data.contains("skeleton"))
|
||||
{
|
||||
((Horse)spawned).setVariant(Horse.Variant.SKELETON_HORSE);
|
||||
}
|
||||
else if (data.contains("undead"))
|
||||
{
|
||||
((Horse)spawned).setVariant(Horse.Variant.UNDEAD_HORSE);
|
||||
}
|
||||
|
||||
if (data.contains("polka") || data.contains("sooty"))
|
||||
{
|
||||
((Horse)spawned).setStyle(Horse.Style.BLACK_DOTS);
|
||||
}
|
||||
else if (data.contains("socks") || data.contains("blaze"))
|
||||
{
|
||||
((Horse)spawned).setStyle(Horse.Style.WHITE);
|
||||
}
|
||||
else if (data.contains("leopard") || data.contains("appaloosa"))
|
||||
{
|
||||
((Horse)spawned).setStyle(Horse.Style.WHITE_DOTS);
|
||||
}
|
||||
else if (data.contains("splotchy") || data.contains("milky") || data.contains("paint"))
|
||||
{
|
||||
((Horse)spawned).setStyle(Horse.Style.WHITEFIELD);
|
||||
}
|
||||
|
||||
if (data.contains("black"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.BLACK);
|
||||
}
|
||||
else if (data.contains("chestnut") || data.contains("liver"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.CHESTNUT);
|
||||
data = data.replace("chestnut", "");
|
||||
}
|
||||
else if (data.contains("creamy") || data.contains("flaxen"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.CREAMY);
|
||||
}
|
||||
else if (data.contains("gray") || data.contains("dapple"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.GRAY);
|
||||
}
|
||||
else if (data.contains("dark") || data.contains("darkbrown") || data.contains("dbrown") || data.contains("buckskin"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.DARK_BROWN);
|
||||
}
|
||||
else if (data.contains("brown") || data.contains("bay"))
|
||||
{
|
||||
((Horse)spawned).setColor(Horse.Color.BROWN);
|
||||
}
|
||||
|
||||
if (data.contains("chest"))
|
||||
{
|
||||
((Horse)spawned).setTamed(true);
|
||||
((Horse)spawned).setCarryingChest(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void defaultMobData(final EntityType type, final Entity spawned)
|
||||
|
Loading…
Reference in New Issue
Block a user