Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a LootTable Serializer #7528

Conversation

Burbulinis
Copy link
Contributor

Description

This PR adds a LootTable serializer.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

Copy link
Contributor

@ShaneBeee ShaneBeee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor little things

@sovdeeth
Copy link
Member

Do you think it's alright to save these when the available loottables could be changing between variables loads? Since it's only saving the key, it's reliant on the server environement not changing between saving and loading. If a data pack is removed, it could cause these variables to fail to load.

@ShaneBeee
Copy link
Contributor

Do you think it's alright to save these when the available loottables could be changing between variables loads? Since it's only saving the key, it's reliant on the server environement not changing between saving and loading. If a data pack is removed, it could cause these variables to fail to load.

In all fairness, the same could be said for anything that has a RegistryClassInfo, as well as ItemType.
Mojang lately has been breaking/changing a lot of things, and it could happen at anytime.
They could remove a biome, or rename it. (or as you mentioned, data pack removal)
They could rename an item (ex: when they changed grass_path to dirt_path).
In all these cases variable loading would fail on said variable.
At this point in time we almost have to just say "Yep, that was a #MojangMoment" and hope for the best.

@sovdeeth
Copy link
Member

Good point, it's the same for blocks and removing worlds too. Just wanted to confirm there wasn't a better way.

@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 28, 2025
@APickledWalrus APickledWalrus added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Feb 1, 2025
@APickledWalrus APickledWalrus merged commit b4db4b1 into SkriptLang:dev/patch Feb 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants