Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-168918

Replacing by shulker box contents on main-hand clears offhand under a 'minecraft:contents' entry

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.15.1
    • None
    • Unconfirmed
    • (Unassigned)

      How the bug works

      While using loot command to replace items on a player's main-hand, it works, but it also clears the offhand via a minecraft:contents entry.

      How to do

      1. Use the command to place a contained shulker box.
      /setblock ~ ~3 ~ shulker_box{Items:[{Slot:0b,id:"minecraft:stone",Count:1b}]}
      1. Take an item, (like, an emerald or else,) on your offhand.
      2. Use the other command to trigger the condition (see shulker_box.json.)
      /loot replace entity @s weapon.mainhand mine ~ ~3 ~ stone{getContents:true}

            Unassigned Unassigned
            Flesy_Z FlesyZ
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: