mojira.dev
MC-274033

Entities don't update their NBT data properly

Issue can be seen in the video. Long story short, entities don't update their nbt data properly after they were modified using the "data" command. I was using item frame with item as sort of a menu for changing values (direction, game, ext.) of arcade machine, since it can be both right clicked and left clicked. I was not spawning new item frames. I was only using data modify on one item frame. I modified "Facing" nbt data, but the position of item was off. I checked its nbt data again using "data get", but there wasn't anything wrong. When I reloaded the world, it looked as it should.

 

Update #1:

I was asked to provide commands necessary for reproducing this bug. I recommend using command "/data modify entity <entity> Facing set value 5b" on item frame with nbt data"Facing 1b". After using this command on item frame, it should change position (at least visually). Reloading world should fix it.

 

Update #2:

I was asked if there are any other entities affected by this bug. I haven't tested it with many entities, but another example would be item display entity. However, I am not sure if this is bug or a feature. I used command similiar to this one in my datapack multiple times: "execute as <entity> <path> run execute as @s at @s run execute store result data entity @s <path> run execute if data entity @s <data> run return 1". The first command worked in the mcfunction file, but others were ignored (others with the "return <something>"). I am not sure if it is intended for command "return" work only once per tick or if it is a bug which makes only one "return" command work.

Linked issues

Attachments

Comments 4

By the way, it is not the issue of datapack. I checked everything.

Please provide steps to reproduce the issue, with the exact commands that need to be run for the issue to happen.

If a data pack is necessary to reproduce the bug, please provide it as well.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Does this only affect item frames "Facing" or does this also affect other entities? If so, which ones?

Edit: I can reproduce the issue with Facing specifically, but since your bug report says that NBT doesn't update properly in general I'm wondering what you mean by that.

I can confirm that item frames don't always change their visual rotation until the world is reloaded. However, if this is the only issue described here, this issue is the same as MC-181110 and MC-234034, which are invalid. About your second update, the /return command, when run from inside a function, exits the function. So, unless your function skips the first command because the entity data check fails, no other commands from that function will be run.

MrRedi

(Unassigned)

Unconfirmed

Commands, Entities

1.21

Retrieved