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

/replaceitem allows incongruous slot types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Works As Intended
    • Affects Version/s: Minecraft 19w05a
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      Commands

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: