mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle
This commit is contained in:
parent
4483ff40b4
commit
3aca9f793b
1 changed files with 14 additions and 0 deletions
|
@ -471,6 +471,20 @@ public class SpawnMob
|
||||||
((Horse)spawned).setTamed(true);
|
((Horse)spawned).setTamed(true);
|
||||||
((Horse)spawned).setCarryingChest(true);
|
((Horse)spawned).setCarryingChest(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.contains("saddle"))
|
||||||
|
{
|
||||||
|
((Horse)spawned).setTamed(true);
|
||||||
|
((Horse)spawned).getInventory().setSaddle(new ItemStack(Material.SADDLE, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == EntityType.PIG)
|
||||||
|
{
|
||||||
|
if (data.contains("saddle"))
|
||||||
|
{
|
||||||
|
((Pig)spawned).setSaddle(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue