Using /setblock or /fill on a container with loot not yet generated will always drop its contents
The bug
If /setblock or /fill is used on a container that has not had its loot generated yet, it will always drop its contents. The expected behavior would be for the container to only drop its contents if the "destroy" argument is used.
How to reproduce
- Run the command
/setblock ~ ~ ~1 minecraft:chest{LootTable:"minecraft:blocks/dirt"} - Then run the command
/setblock ~ ~ ~1 air
→
Notice dirt has been dropped by the chest despite the command not being set to "destroy".