The Bug:
Blocks such as Shulker Boxes, Command Blocks, Structure Blocks, Spawners, etc. that are picked up by an enderman don't have their NBT saved.
To Reproduce:
Make a datapack and add "minecraft:shulker_box" to the #enderman_holdable tag
Do /give @p shulker_box{BlockEntityTag:{Items:[{Slot:0,id:stone,Count:64}]}} 1
Place a bunch of them around
Summon many enderman and wait for one to hold a shulker box
Wait for an enderman to place down the shulker box
Results:
**When you open the shulker box, the items inside the shulker box will disappear.
Comments 4
The block state NBT is a commonly used across entities (endermen, falling blocks, arrows, moving pistons). It would be great if it included a block entity object (excluding x y and z), so that all these places are consistent in saving that data. Currently only falling blocks can save the block entity (under the object TileEntityTag), but saving it for all would not only fix this, but also be a good step for movable block entities.
I think that NBT data isn't saved because endermen were never meant to hold shulker boxes. But it would be nice if Mojang patched this though. ¯_(ツ)_/¯ so yeah