AttributeModifiers NBT with missing fields is not upgraded correctly to components
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the tag will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}
- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world in 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes, which should still increase the player's movement speed.
Observed behaviour
The items are not upgraded correctly and and their AttributeModifiers tag disappears completely.
Created Issue:
AttributeModifiers NBT fails to load if some of its fields are missing
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you go to the snapshot 24w09a with an item that has one of these fields omitted, the item will simply disappear.
Here are the steps to reproduce it. Create a world with version 1.20.4 with cheats enabled and run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
Now, enter the same world as 24w09a and observe that the items have vanished.
Thank you for your report!
We're tracking this issue inMC-269037, so this ticket is being resolved and linked as a duplicate.That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
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 (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you go to the snapshot 24w09a with an item that has one of these fields omitted, the item will simply disappear.
Here are the steps to reproduce it. Create a world with version 1.20.4 with cheats enabled and run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
Now, enter the same world as 24w09a and observe that the items have vanished.In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the item will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world as 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes.
Observed behaviour
The items are not upgraded correctly and completely disappear.
AttributeModifiers NBTfails to load if some of its fields are missingAttributeModifiers NBT with missing fields is not upgraded correctly to components, leading to item loss
duplicates
relates to
duplicates
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the item will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world
as24w09aExpected behaviour
The items should be transferred correctly, along with their attributes.
Observed behaviour
The items are not upgraded correctly and completely disappear.
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the item will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world in 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes.
Observed behaviour
The items are not upgraded correctly and completely disappear.
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the item will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world in 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes, which should still increase the player's movement speed.
Observed behaviour
The items are not upgraded correctly and completely disappear.
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the
itemwill simply disappear.Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world in 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes, which should still increase the player's movement speed.
Observed behaviour
The items are not upgraded correctly and completely disappear.
In versions 1.20.4 or before, an item's AttributeModifiers tag was accepted correctly even if the Operation or Name fields were omitted. However, if you open a world in snapshot 24w09a with a custom item that has an attribute with one of these fields omitted, the tag will simply disappear.
Steps to reproduce
- Create a world with version 1.20.4 with cheats enabled
- Run these commands to obtain the items.
// without Name give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Amount:1d,Operation:0,UUID:[I;1,1,1,1]}]} // without Operation give @p stone{AttributeModifiers:[{AttributeName:"minecraft:generic.movement_speed",Name:"",Amount:1d,UUID:[I;1,1,1,1]}]}- When you hold these items in your hands, you will notice that your movement speed increases correctly, even though the fields are missing.
- Now, enter the same world in 24w09a
Expected behaviour
The items should be transferred correctly, along with their attributes, which should still increase the player's movement speed.
Observed behaviour
The items are not upgraded correctly and and their AttributeModifiers tag disappears completely.
AttributeModifiers NBT with missing fields is not upgraded correctly to components, leading to item loss
Apologies for the incorrect resolution as duplicate of
MC-269037. It wasn't clear to me that this is a world upgrade issue. I've edited the bug report slightly to make this clearer.Uh wait... I apologize, it appears that only the AttributeModifier tag is lost, not the entire item. I wrote them incorrectly at first.