mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-09 06:50:32 +08:00
Fixes to mob equipment behaviour
* Set correct flag for CanPickUpLoot on NBT load * Drop previous equipment on mob equipment pickup
This commit is contained in:
parent
1f6c04c0f4
commit
d219213e2b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user