From bf43ca62a65800d1c1ced66d2e018eea28058bf0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 7 Mar 2016 19:51:42 +1100 Subject: SPIGOT-1816: Rework drop capture. --- nms-patches/EntityInsentient.patch | 40 +++++--------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) (limited to 'nms-patches/EntityInsentient.patch') diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch index b5aa5945..dbed31cb 100644 --- a/nms-patches/EntityInsentient.patch +++ b/nms-patches/EntityInsentient.patch @@ -64,28 +64,7 @@ } public boolean d(Class oclass) { -@@ -225,6 +267,7 @@ - return null; - } - -+ protected ItemStack headDrop = null; // CraftBukkit - protected void dropDeathLoot(boolean flag, int i) { - Item item = this.getLoot(); - -@@ -240,6 +283,12 @@ - } - } - -+ // CraftBukkit start -+ if (headDrop != null) { -+ this.a(headDrop, 0.0F); -+ headDrop = null; -+ } -+ // CraftBukkit end - } - - public void b(NBTTagCompound nbttagcompound) { -@@ -321,11 +370,20 @@ +@@ -321,11 +363,20 @@ public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); @@ -108,16 +87,7 @@ NBTTagList nbttaglist; int i; -@@ -406,7 +464,7 @@ - } - - this.dropEquipment(flag, i); -- } else { -+ } { // CraftBukkit - remove else - super.a(flag, i, damagesource); - } - -@@ -549,11 +607,11 @@ +@@ -549,11 +600,11 @@ double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -131,7 +101,7 @@ this.die(); } else if (d3 < 1024.0D) { this.ticksFarFromPlayer = 0; -@@ -931,9 +989,21 @@ +@@ -931,9 +982,21 @@ public final boolean a(EntityHuman entityhuman, ItemStack itemstack, EnumHand enumhand) { if (this.isLeashed() && this.getLeashHolder() == entityhuman) { @@ -153,7 +123,7 @@ this.setLeashHolder(entityhuman, true); --itemstack.count; return true; -@@ -953,10 +1023,12 @@ +@@ -953,10 +1016,12 @@ if (this.bC) { if (!this.isAlive()) { @@ -166,7 +136,7 @@ this.unleash(true, true); } } -@@ -1037,6 +1109,7 @@ +@@ -1037,6 +1102,7 @@ this.leashHolder = entityleash; } else { -- cgit v1.2.3