mojira.dev
MC-225394

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

  1. Run the command

    /setblock ~ ~ ~1 minecraft:chest{LootTable:"minecraft:blocks/dirt"}
  2. 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

Attachments

Comments 4

Can confirm in 1.17.

Can confirm in 1.17.1.

Can confirm in 1.19.

Aldinyx

(Unassigned)

Confirmed

(Unassigned)

1.16.5, 1.17, 1.17.1, 1.19

Retrieved