Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Fix ItemData Serialization

Open APickledWalrus opened this issue 2 years ago • 1 comments

Description

This PR fixes the ItemData serialization issues (e.g. assertion error for diamond sword named "BOB") by serializing BlockValues stored on the ItemData. This is not currently done, which means recreated ItemData's are missing data.

We should probably port this to dev/2.6 - proper serialization will need to be done there too.

This is a breaking change. Because we are updating the ItemData serialization method, it will NOT be possible to downgrade your Skript version (to one without this fix) after using a Skript version containing this fix. Well, it will be possible, but variables will fail to load.


Target Minecraft Versions: Any Requirements: N/A Related Issues: I don't think any

APickledWalrus avatar Jul 26 '22 06:07 APickledWalrus

Make sure you test this on legacy versions as well, maybe it'd be a good idea to even create the PR for that on the dev/2.6 branch already. This will require a more elaborate solution than just a cherry pick; dev/2.6 has MagicBlockValues.

Legacy versions will need their own PR, which I plan to make after this one is merged :)

APickledWalrus avatar Sep 21 '22 23:09 APickledWalrus

I've integrated #5105 into this PR. This avoids usage of Material registry completely and just replaced it with the direct calls it would be making. Build should pass, but needs tested with a bigger set of item variables.

APickledWalrus avatar Oct 06 '22 22:10 APickledWalrus