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".
Linked issues
duplicates 1
Attachments
Comments 4
Duplicate of MC-136917.
Can confirm in 1.17.