Paper
Paper copied to clipboard
Saved item attributes break when moving from 1.21.1 to 1.21.4+ (and 1.21.5)
Expected behavior
When updating from 1.21.1 to 1.21.4 or 1.21.5 item meta serialization should automatically change from the old serialization to new one. All item attributes / components should be kept
Observed/Actual behavior
Updating from 1.21.1 to 1.21.4 or 1.21.5 breaks all item attributes of saved item meta when serializing in 1.21.1 with ConfigurationSerializable.serialize() and deserializing with ConfigurationSerialization.deserializeObject()
I did not test the methods, I looked them up on Shopkeepers source here where the item attributes are lost on conversion.
Steps/models to reproduce
- Save items in 1.21.1 with a plugin that uses
ConfigurationSerializable.serialize()andConfigurationSerialization.deserializeObject(). (for example Shopkeepers, ItemEdit, ExcellentCrates or playerkits2) - Update to 1.21.4 or 1.21.5 (and possibly update plugins if necessary).
- Take items from the save, and test if they have attributes or not
Plugin and Datapack List
nightcore 2.7.5.2 (for excellentCrates), ExcellentCrates 6.2.0, ItemEdit 3.7.0, Shopkeepers 2.23.5
Paper version
Old version
This server is running Paper version 1.21.1-133-ver/1.21.1@3cb8529 (2025-03-28T16:14:36Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Earlier test
This server is running Paper version 1.21.4-229-ver/1.21.4@e2ca477 (2025-05-09T15:52:06Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are 2 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.1-21-cfa3c61 (MC: 1.21.1)
New test
This server is running Paper version 1.21.5-93-main@87349c3 (2025-05-21T16:27:20Z) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-133-3cb8529 (MC: 1.21.1)
Other
I do not know what is the version where the error first occurs, but it's between 1.21.1 and 1.21.4.
It's also possible that other methods than ConfigurationSerializable.serialize() and ConfigurationSerialization.deserializeObject() are affected, as I did not look up other than what method Shopkeepers uses.
ItemMeta has pretty much never properly dealt with upgrades; this is one of many reasons as to we switched format. We also no longer support serialising ItemMeta. If you have data that isn't migrating, we can look into it. However, IM data upgrades are basically nonexistent.
ItemMeta has pretty much never properly dealt with upgrades; this is one of many reasons as to we switched format. We also no longer support serialising ItemMeta. If you have data that isn't migrating, we can look into it. However, IM data upgrades are basically nonexistent.
The data differs from plugin to plugin, since they have slightly different ways in storing and migrating data. I don't really need help for the data migration myself, since I can probably avoid it, but it would be great if it could be automatically migrated.
If someone is interested:
I first created an issue at Shopkeepers' GitHub where there should be the example data of the issues that could occur: https://github.com/Shopkeepers/Shopkeepers/issues/962.
These could be the issues:
- all attributes in 1.21.1 had a prefix
generic.(for examplegeneric.attack_damage). In new versions the prefix is missing. - at least in some plugins the slot for
handwas saved asmainhand.