13
0
geforkt von Mirrors/Paper

Fixes to mob equipment behaviour

* Set correct flag for CanPickUpLoot on NBT load
* Drop previous equipment on mob equipment pickup
Dieser Commit ist enthalten in:
Jacob Martin 2017-04-08 18:05:32 -05:00 committet von md_5
Ursprung 1f6c04c0f4
Commit d219213e2b

Datei anzeigen

@ -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 {