1

/data modify entity not working

JamesTheAwesomeDude 4/1/21 9:31 pm history
1.7k
4/1/2021 11:38 pm
I'm standing here, looking at my cartographer.

According to /data get entity @e[​type=villager,limit=1,sort=nearest] Gossips,he has 4 Gossips.

I want to remove all these gossips except one.

So I execute the following:/data modify entity @e[type=villager,limit=1,sort=nearest] Gossips set value {Gossips:[{Type:"major_positive",Value:40,Target:[I; -1701011523, 864437673, -1855586262, -112748354]}]}pasted directly from my chat box.

But when I run the same command again, he has the same 4 Gossips as before.

What am I doing wrong? I'm running Minecraft 1.16.5 with no gameplay-altering mods, testing on a singleplayer world with Cheats enabled.
Posted by
JamesTheAwesomeDude
Level 28 : Expert Cupcake
15

  Have something to say?

JoinSign in

2

HoboMaggot
04/01/2021 11:38 pm
Level 55 : Grandmaster Blob
history
In my testing, I could only add gossip values to the villager but not remove them using /data modify or /data remove
Your problem is related a bug that hasnt been fixed yet
bugs.mojang.com/browse/MC-153392
2
JamesTheAwesomeDude
04/01/2021 9:34 pm
Level 28 : Expert Cupcake
history
I was running the wrong command earlier.

But now I'm running this:/data modify entity @e[type=villager,limit=1,sort=nearest] Gossips set value [{Type:"major_positive",Value:40,Target:[I; -1701011523, 864437673, -1855586262, -112748354]}] it still doesn't work; the villager's data doesn't change.

Other commands that look like they succeeded, but don't actually change anything:
  • /data merge entity @e[type=villager,limit=1,sort=nearest] {Gossips:[{Type:"major_positive",Value:40,Target:[I; -1701011523, 864437673, -1855586262, -112748354]}]}
  • /data remove entity @e[type=villager,limit=1,sort=nearest] Gossips[5]
1

Welcome