Fixes issues that arise from trying to deserialize an ItemStack from a TileEntity NBT compound tag.
TileEntities write their own id as "id" to the tag, while ItemStack expects "id" to be a short. This causes
a crash report internally, which causes certain servers (mcpc+/bukkit) to create a costly stack trace,
greatly reducing performance on chunk load.
This change tries to fix that issue by moving the item stack properties over to their own compound nbt tag (as a child of the tile entities one).
Compatibility with older worlds is kept by checking whether the "id" property is a short or not.
Fixes issues that arise from trying to deserialize an ItemStack from a TileEntity NBT compound tag.
TileEntities write their own id as "id" to the tag, while ItemStack expects "id" to be a short. This causes a crash report internally, which causes certain servers (mcpc+/bukkit) to create a costly stack trace, greatly reducing performance on chunk load. This change tries to fix that issue by moving the item stack properties over to their own compound nbt tag (as a child of the tile entities one). Compatibility with older worlds is kept by checking whether the "id" property is a short or not.