Closed UnDeadlyDev closed 3 months ago
You will need to use NBTEditor.CUSTOM_DATA as an additional key to work with 1.21.
int id = NBTEditor.getInt(item, NBTEditor.CUSTOM_DATA, "COSMETIC", "SPRAY");
return NBTEditor.set(icon, id, NBTEditor.CUSTOM_DATA, "COSMETIC", "SPRAY");
This is because of how minecraft items are serialized/deserialized starting version 1.20.5.
Now work thanks and good job
Tried to load invalid item: 'No component with type: 'null'; No component with type: 'null' missed input: {COSMETIC:{SPRAY:0}}'
FOR GET: int id = NBTEditor.getInt(item, "COSMETIC", "SPRAY");
FOR SET: return NBTEditor.set(icon, id,"COSMETIC", "SPRAY");