skript-yaml icon indicating copy to clipboard operation
skript-yaml copied to clipboard

1.21 Item Components not being saved to yaml value.

Open GentlemanCheesy opened this issue 1 year ago • 8 comments

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. image

Tested on Paper 1.21 with Skript 2.9.0 and Skript-Yaml 1.5 Before: image After: image

GentlemanCheesy avatar Jul 30 '24 17:07 GentlemanCheesy

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

EternalHellTTV avatar Aug 18 '24 20:08 EternalHellTTV

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?

Sashie avatar Oct 26 '24 02:10 Sashie

I'm almost certain that this data was saved and loaded on the same version, 1.21

GentlemanCheesy avatar Oct 26 '24 02:10 GentlemanCheesy

So it saves it fine but after load its missing data?

Sashie avatar Oct 26 '24 03:10 Sashie

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.

GentlemanCheesy avatar Oct 26 '24 22:10 GentlemanCheesy

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. image

GentlemanCheesy avatar Oct 26 '24 22:10 GentlemanCheesy

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?

Sashie avatar Oct 26 '24 23:10 Sashie

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.

itemsavecopy.txt

GentlemanCheesy avatar Oct 27 '24 03:10 GentlemanCheesy

i think this is fixed now, if it happens again we can re-open it.

Sashie avatar Jul 19 '25 16:07 Sashie