PaperMC/patches
Josh Roy 166dc90e1c Remove CraftItemStack#setAmount null assignment (#8807)
This creates a problem with Paper's item serialization
api where deserialized items, which are internally
created as a CraftItemStack, will be completely lost if
#setAmount(0) is invoked (since the underlying handle
is set to null), while a regular Bukkit ItemStack
simply sets the amount field to zero, retaining the
item's data.

Vanilla treats items with zero amounts the same as items
with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.
2023-01-24 09:30:51 -05:00
..
api [ci skip] Fix PiglinBarterEvent JavaDoc (#8795) 2023-01-22 20:33:21 +02:00
server Remove CraftItemStack#setAmount null assignment (#8807) 2023-01-24 09:30:51 -05:00