The bug
This bug report has to do with the BlockDataTag
of the beenest or beehive item.
When the nest is broken in Survival via Silk Touch, the BlockDataTag.honey_level
tag has type String
However, when broken in Creative (the nest drops as an item if there are bees inside), the tag has type int
.
How to reproduce
Place beehive/nest (doesn't matter)
Let bees enter the block (don't need to wait until honey produced, and necessary so that a block is dropped in creative)
Breaking the block in Creative yields a
int
typePick block with NBT in Creative yields a
int
typeBreaking the block in Survival with silk touch yields an
String
type.
Comments 5
Thanks for verifying. Just checked, breaking in creative has type int. (this discrepancy makes modding very tricky).
Can confirm for 20w16a, but I am seeing the reverse:
Creative:
int
Survival:
String
The reason for this is that for Creative this is a special case in the
playerWillDestroy
method, while for Survival it uses the loot table functioncopy_state
which always serializes properties as String.