mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed
This commit is contained in:
parent
1748af891b
commit
b634e059e0
1 changed files with 3 additions and 1 deletions
|
@ -120,11 +120,13 @@
|
||||||
if (this.pickupDelay == 0 && (this.g == null || 6000 - this.age <= 200 || this.g.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) {
|
if (this.pickupDelay == 0 && (this.g == null || 6000 - this.age <= 200 || this.g.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) {
|
||||||
entityhuman.receive(this, i);
|
entityhuman.receive(this, i);
|
||||||
if (itemstack.isEmpty()) {
|
if (itemstack.isEmpty()) {
|
||||||
@@ -294,6 +345,7 @@
|
@@ -294,7 +345,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemStack(ItemStack itemstack) {
|
public void setItemStack(ItemStack itemstack) {
|
||||||
+ com.google.common.base.Preconditions.checkArgument(!itemstack.isEmpty(), "Cannot drop air"); // CraftBukkit
|
+ com.google.common.base.Preconditions.checkArgument(!itemstack.isEmpty(), "Cannot drop air"); // CraftBukkit
|
||||||
this.getDataWatcher().set(EntityItem.b, itemstack);
|
this.getDataWatcher().set(EntityItem.b, itemstack);
|
||||||
|
+ this.getDataWatcher().markDirty(EntityItem.b); // CraftBukkit - SPIGOT-4591, must mark dirty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
|
Loading…
Reference in a new issue