1.21 Item Components not being saved to yaml value.
For some reason items I'm saving to a yaml file are not keeping their "Tool Rules" components they have when saved. It defaults back to the default tool rules of a wooden pickaxe as that's the item that has the custom tool rules.
Tested on Paper 1.21 with Skript 2.9.0 and Skript-Yaml 1.5
Before:
After:
Yaml has not been updated for over a year, There would be issues as 1.21 did major changes. 1.20.4 does work fine
By chance was the data already saved from a previous minecraft version and then after loading it and saving it in 1.21 it lost that certain data?
I'm almost certain that this data was saved and loaded on the same version, 1.21
So it saves it fine but after load its missing data?
I have attempted this again and found that there is an error in console upon saving the item. You can find that error from my logs at this pastebin link: https://pastebin.com/P7F2VexB
The same result with the saved item losing its tool data during the save. Giving myself the saved item has default tool data of whatever pickaxe is used.
It seems that not including a speed for a tool rule has some sort of effect on the save (if i am reading the error correctly). Which is strange since by default pickaxes dont include a speed with the tag for incorrect blocks for that tool type.
When I get home I'll check that error and see about fixing it for the next version, if you have discord and are in the skunity group message me and I can let you test the new version
Could you please provide the skript code to produce this error as well?
Here is the script i am using, if you dont already have an item that can be saved for testing use: https://mcstacker.net I can provide a pre-saved item.yml if need be.
i think this is fixed now, if it happens again we can re-open it.