@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user