diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-02-26 22:41:06 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-03-04 09:48:58 +0000 |
commit | d8a9c7be4227b2243968b63ab7cc7a00098c93ad (patch) | |
tree | 554a08a5f23ffa5dd66a28247d6358515b1ffb7a /nms-patches/EntityLeash.patch | |
parent | 33d5de312e9fcc8aec3fc53136658cb6920562aa (diff) | |
download | craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.gz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.lz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.tar.xz craftbukkit-d8a9c7be4227b2243968b63ab7cc7a00098c93ad.zip |
Update to Minecraft 1.8.3
Diffstat (limited to 'nms-patches/EntityLeash.patch')
-rw-r--r-- | nms-patches/EntityLeash.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/EntityLeash.patch b/nms-patches/EntityLeash.patch index 834e5600..d3ae3bd7 100644 --- a/nms-patches/EntityLeash.patch +++ b/nms-patches/EntityLeash.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityLeash.java 2014-11-28 17:43:43.121707434 +0000 -+++ src/main/java/net/minecraft/server/EntityLeash.java 2014-11-28 17:38:18.000000000 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityLeash.java 2015-02-26 22:40:22.607608139 +0000 ++++ src/main/java/net/minecraft/server/EntityLeash.java 2015-02-26 22:40:22.607608139 +0000 @@ -3,6 +3,8 @@ import java.util.Iterator; import java.util.List; @@ -12,7 +12,7 @@ @@ -63,6 +65,12 @@ while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.cb() && entityinsentient.getLeashHolder() == entityhuman) { + if (entityinsentient.cc() && entityinsentient.getLeashHolder() == entityhuman) { + // CraftBukkit start + if (CraftEventFactory.callPlayerLeashEntityEvent(entityinsentient, this, entityhuman).isCancelled()) { + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutAttachEntity(1, entityinsentient, entityinsentient.getLeashHolder())); @@ -25,7 +25,7 @@ @@ -70,8 +78,11 @@ } - if (!this.world.isStatic && !flag) { + if (!this.world.isClientSide && !flag) { - this.die(); - if (entityhuman.abilities.canInstantlyBuild) { + // CraftBukkit start - Move below @@ -39,7 +39,7 @@ @@ -79,10 +90,21 @@ while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.cb() && entityinsentient.getLeashHolder() == this) { + if (entityinsentient.cc() && entityinsentient.getLeashHolder() == this) { - entityinsentient.unleash(true, false); + // CraftBukkit start + if (CraftEventFactory.callPlayerUnleashEntityEvent(entityinsentient, entityhuman).isCancelled()) { |