summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Martin <jjm_223@hotmail.com>2017-04-08 18:05:32 -0500
committermd_5 <git@md-5.net>2017-04-09 11:45:37 +1000
commitd219213e2bb8b63e6ca51c1c86a7a698ac5106d3 (patch)
tree4577834a21fdc7b70139995994538dd912bdbac1
parent1f6c04c0f4a5fb3b9aa2c0978e9cee1cf504127f (diff)
downloadcraftbukkit-d219213e2bb8b63e6ca51c1c86a7a698ac5106d3.tar
craftbukkit-d219213e2bb8b63e6ca51c1c86a7a698ac5106d3.tar.gz
craftbukkit-d219213e2bb8b63e6ca51c1c86a7a698ac5106d3.tar.lz
craftbukkit-d219213e2bb8b63e6ca51c1c86a7a698ac5106d3.tar.xz
craftbukkit-d219213e2bb8b63e6ca51c1c86a7a698ac5106d3.zip
Fixes to mob equipment behaviour
* Set correct flag for CanPickUpLoot on NBT load * Drop previous equipment on mob equipment pickup
-rw-r--r--nms-patches/EntityInsentient.patch22
1 files changed, 16 insertions, 6 deletions
diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch
index 44801a84..d76af694 100644
--- a/nms-patches/EntityInsentient.patch
+++ b/nms-patches/EntityInsentient.patch
@@ -75,7 +75,7 @@
- this.m(nbttagcompound.getBoolean("CanPickUpLoot"));
+ boolean data = nbttagcompound.getBoolean("CanPickUpLoot");
+ if (isLevelAtLeast(nbttagcompound, 1) || data) {
-+ this.l(data);
++ this.m(data);
+ }
}
@@ -88,7 +88,17 @@
NBTTagList nbttaglist;
int i;
-@@ -569,11 +621,11 @@
+@@ -521,7 +573,9 @@
+ }
+
+ if (!itemstack1.isEmpty() && (double) (this.random.nextFloat() - 0.1F) < d0) {
++ this.forceDrops = true; // CraftBukkit
+ this.a(itemstack1, 0.0F);
++ this.forceDrops = false; // CraftBukkit
+ }
+
+ if (itemstack.getItem() == Items.DIAMOND && entityitem.n() != null) {
+@@ -569,11 +623,11 @@
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@@ -102,7 +112,7 @@
this.die();
} else if (d3 < 1024.0D) {
this.ticksFarFromPlayer = 0;
-@@ -942,12 +994,24 @@
+@@ -942,12 +996,24 @@
public final boolean b(EntityHuman entityhuman, EnumHand enumhand) {
if (this.isLeashed() && this.getLeashHolder() == entityhuman) {
@@ -127,7 +137,7 @@
this.setLeashHolder(entityhuman, true);
itemstack.subtract(1);
return true;
-@@ -968,10 +1032,12 @@
+@@ -968,10 +1034,12 @@
if (this.bD) {
if (!this.isAlive()) {
@@ -140,7 +150,7 @@
this.unleash(true, true);
}
}
-@@ -982,7 +1048,9 @@
+@@ -982,7 +1050,9 @@
this.bD = false;
this.leashHolder = null;
if (!this.world.isClientSide && flag1) {
@@ -150,7 +160,7 @@
}
if (!this.world.isClientSide && flag && this.world instanceof WorldServer) {
-@@ -1052,6 +1120,7 @@
+@@ -1052,6 +1122,7 @@
this.setLeashHolder(entityleash, true);
} else {