-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.14.2, 1.16.4
-
None
-
Confirmed
-
(Unassigned)
Adding a set_contents function of type dynamic and name contents to the chest or barrel loot table doesn't make them keep their items when broken.
{ "function": "minecraft:set_contents", "entries": [ { "type": "minecraft:dynamic", "name": "minecraft:contents" } ] }
An empty BlockEntityTag.Items nbt is added to the dropped item instead
tag: {BlockEntityTag: {Items: []}}}
Adding set_contents with named entries does work though.
I assume this is because the Java code for chests and barrels remove the items from the container before the nbt is updated, and shulker boxes must be the other way around?
Removing set_contents from the shulker_box loot table does stop it from keeping it's contents, and adding a type dynamic contents entry will make it drop it's contents. So it all works as expected for shulker boxes, but it should work for all containers (please).