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

/replaceitem allows incongruous slot types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 19w05a
    • Confirmed
    • Commands

      The bug

      The /replaceitem command allows in general incongruous slot types, e.g. you can use inventory.X for a container (where you should use container.X), see MC-143663.
      This can result in targeting the wrong slot and the mistake is often not obvious.

      The expected behavior would be that the slot is validated based on the targeted entity or block and the command would fail executing if the wrong slot type is used.

      How to reproduce

      1. Place a chest
      2. Use inventory.X as slot
        /replaceitem block ~1 ~ ~ inventory.0 stone
        

        The command is executed and the stone is placed in the second row

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: