ItemStack have no components when picked up
biom4st3r opened this issue ยท 2 comments
When you try to recollected a dropped ItemStack any components are not copied over.
This is caused by Minecraft copying ItemStacks in a non-standard way, inside PlayerInventory, when ItemEntities are picked up. Instead of using ItemStack.copy() they make a new ItemStack and copy the tag from from the old.
My stack trace ending with the method in question
Presumably, this is also why /give also gives ItemStacks without components
When PlayerInventory#addStack creates the new ItemStack it is created with a size of 0. This causes ItemStack#getItem() to return air during MixinItemStack#initComponents()