mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
166dc90e1c
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. |
||
---|---|---|
.. | ||
api | ||
server |