From 3aca9f793bf2d174800525d50de97158a381c998 Mon Sep 17 00:00:00 2001 From: okamosy Date: Wed, 17 Jul 2013 18:09:56 +0100 Subject: [PATCH] Added saddles to pigs and horses /spawnmob pig:saddle /spawnmob horse:saddle --- .../src/com/earth2me/essentials/SpawnMob.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/SpawnMob.java b/Essentials/src/com/earth2me/essentials/SpawnMob.java index d7af9df35..63686f40e 100644 --- a/Essentials/src/com/earth2me/essentials/SpawnMob.java +++ b/Essentials/src/com/earth2me/essentials/SpawnMob.java @@ -471,6 +471,20 @@ public class SpawnMob ((Horse)spawned).setTamed(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); + } } }