mojira.dev
MC-207602

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

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...

Linked issues

Comments 2

I have also had this problem with a Horse's SaddleItem, which I cannot seem to remove in any way. Also not working: Setting the count to 0, setting the id to 'air', both, setting it item to {}, setting it from a horse without a saddle...

Thank you for your report!
We're tracking this issue in MC-128225, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit

kcrca

(Unassigned)

Unconfirmed

(Unassigned)

1.16.4

Retrieved