mojira.dev
MC-313809

/loot replace fails to place non-stackable items (such as shields) into shelf blocks

Running /loot replace block targeting a shelf block (e.g. minecraft:poplar_shelf) successfully places stackable items (such as minecraft:cookie) into the shelf's slots, but fails to place non-stackable items (such as minecraft:shield, minecraft:enchanted_book, or minecraft:bundle).

By contrast, using /item replace block with the exact same target slot and non-stackable item works as expected, confirming that shelf slots are capable of holding these items via commands.

Steps to Reproduce:

  1. Place any shelf block (e.g., minecraft:poplar_shelf) in the world.

  2. Run /loot replace with a stackable item (control test):

    /loot replace block <x> <y> <z> container.0 1 loot {pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:cookie"}]}]}

    (Observe that the cookie is placed into slot 0 of the shelf.)

  3. Run /loot replace with a non-stackable item:

    /loot replace block <x> <y> <z> container.0 1 loot {pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:shield"}]}]}

    Use code with caution.

  4. Check the shelf visually or run /data get block <x> <y> <z> Items.

  5. Run /item replace with the same item for comparison:

    /item replace block <x> <y> <z> container.0 with minecraft:shield

Observed Results:

  • /loot replace with minecraft:cookie succeeds and populates the shelf slot.

  • /loot replace with minecraft:shield fails to place the item into the shelf (the slot remains empty in both the block model and Items NBT data).

  • /item replace with minecraft:shield succeeds and places the shield into the shelf slot.

Expected Results:
/loot replace should successfully place valid, non-empty loot table rolls—including non-stackable items like shields, enchanted books, and bundles—into shelf block slots, matching the behavior of /item replace and standard containers (like chests or barrels).

Comments 0

No comments.

FaceToaster

(Unassigned)

Unconfirmed

26.3

Retrieved