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

'/execute store' can modify player data inside item "tags" of their Inventory or EnderItems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 17w50a, Minecraft 18w02a, Minecraft 18w03a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w08a, Minecraft 18w08b, Minecraft 18w11a, Minecraft 1.13-pre6, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 18w43a
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed

      Description

      The bug

      Player data has been confirmed as something that should not be modifiable (see for example MC-120693). Yet this you can use /execute store to modify parts of it.

      I'm personally not against this, it's useful and I think it's restricted to a "safe" area. This report is more to get an answer on "is this intended or not?".

      Affected tags

      Affected is the tag NBT key for items inside a player's Inventory key, EnderItems or SelectedItem (not a saved tag, but see MC-121900) key.

      How to reproduce

      1. Run
        /give @s stick{Test:1b}
        
      2. Make sure the stick is in the most left slot in your hotbar
      3. Run
        /execute store result entity @s Inventory[0].tag.Test byte 5 run data get entity @s Pos[0]
        
      4. Run
        /data get entity @s Inventory[0].tag.Test
        

        → The Test tag indeed has the 5 times the X position of the player when the second command was ran as its value

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dinnerbone [Mojang] Nathan Adams
                Reporter:
                Pepijn96 Pepijn
              • Votes:
                8 Vote for this issue
                Watchers:
                25 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: