Skip to content

Commit

Permalink
Remove itemstack mutation on player drop method
Browse files Browse the repository at this point in the history
This appears to cause alot of issues, as the general assumption when calling this method is that the itemstack would not be mutated.

The dupe that this was meant to resolve was patched.

Fixes #11520 / #11765
  • Loading branch information
Owen1212055 committed Dec 26, 2024
1 parent af2812f commit 6cc87f8
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1399,18 +1399,6 @@
return itemEntity;
}
}
@@ -1955,6 +_,11 @@
return null;
} else {
double d = this.getEyeY() - 0.3F;
+ // Paper start
+ ItemStack tmp = droppedItem.copy();
+ droppedItem.setCount(0);
+ droppedItem = tmp;
+ // Paper end
ItemEntity itemEntity = new ItemEntity(this.level(), this.getX(), d, this.getZ(), droppedItem);
itemEntity.setPickUpDelay(40);
if (includeThrowerName) {
@@ -2008,6 +_,16 @@
}

Expand Down

0 comments on commit 6cc87f8

Please sign in to comment.