diff options
author | md_5 <git@md-5.net> | 2017-01-24 13:39:22 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-01-24 13:39:22 +1100 |
commit | 46226d6a036f0e494203718814c1cc513112051b (patch) | |
tree | 1046ac332b8ee20d708309dbd95c84cf925edf17 /nms-patches | |
parent | 4d3bf2015504897fc69af2a209d4c8bbe217394d (diff) | |
download | craftbukkit-46226d6a036f0e494203718814c1cc513112051b.tar craftbukkit-46226d6a036f0e494203718814c1cc513112051b.tar.gz craftbukkit-46226d6a036f0e494203718814c1cc513112051b.tar.lz craftbukkit-46226d6a036f0e494203718814c1cc513112051b.tar.xz craftbukkit-46226d6a036f0e494203718814c1cc513112051b.zip |
SPIGOT-3031: Pigs are not dropping their saddle
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/EntityPig.patch | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/nms-patches/EntityPig.patch b/nms-patches/EntityPig.patch index 1eed1c43..eb84f4f2 100644 --- a/nms-patches/EntityPig.patch +++ b/nms-patches/EntityPig.patch @@ -9,7 +9,23 @@ public class EntityPig extends EntityAnimal { private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityPig.class, DataWatcherRegistry.h); -@@ -156,6 +158,12 @@ +@@ -125,13 +127,14 @@ + } + + public void die(DamageSource damagesource) { +- super.die(damagesource); ++ // super.die(damagesource); // CraftBukkit - Moved to end + if (!this.world.isClientSide) { + if (this.hasSaddle()) { + this.a(Items.SADDLE, 1); + } + + } ++ super.die(damagesource); // CraftBukkit - Moved from above + } + + @Nullable +@@ -156,6 +159,12 @@ if (!this.world.isClientSide && !this.dead) { EntityPigZombie entitypigzombie = new EntityPigZombie(this.world); @@ -22,7 +38,7 @@ entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD)); entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch); entitypigzombie.setAI(this.hasAI()); -@@ -164,7 +172,8 @@ +@@ -164,7 +173,8 @@ entitypigzombie.setCustomNameVisible(this.getCustomNameVisible()); } |