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

/data remove not working on non-primitive, non-list values

XMLWordPrintable

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

      In my specific case I'm trying to remove a Leash attribute from a mob, but I have found this true for many other properties as well. The example below tries to remove a CustomName

      Steps to reproduce:

       

      /summon pig ^2 ^ ^ {Tags:[tpig],CustomName:"\"Oink\"",NoAI:True}
      … Summoned new Oink
      /data remove entity @e[tag=tpig,limit=1] CustomName
      … Modified entity data of Oink
      

      The second command says "Modified entity data of Oink". But the name is still there, displayed and in data.

       

      /data get entity @e[tag=tpig,limit=1]
      … CustomNameOink has the following entity data: '{"text":"Oink"}' 
      

      The following also doesn't work:

       

      /data remove entity @e[tag=tpig,limit=1] CustomName[]
      … Nothing changed. The specified properties already have these values
      /data remove entity @e[tag=tpig,limit=1] CustomName{}
      … Nothing changed. The specified properties already have these values
      /data remove entity @e[tag=tpig,limit=1] CustomName.text
      … Nothing changed. The specified properties already have these values
      

       Of course, I could remove (for example) NoAI. If only that's what I wanted to do...

            Unassigned Unassigned
            kcrca Ken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: