Skip to content

Add a LootTable Serializer#7528

Merged
APickledWalrus merged 7 commits into
SkriptLang:dev/patchfrom
Burbulinis:patch/add-serializer-to-loottable
Feb 1, 2025
Merged

Add a LootTable Serializer#7528
APickledWalrus merged 7 commits into
SkriptLang:dev/patchfrom
Burbulinis:patch/add-serializer-to-loottable

Conversation

@Burbulinis
Copy link
Copy Markdown
Member

Description

This PR adds a LootTable serializer.


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

Copy link
Copy Markdown
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

Comment thread src/main/java/org/skriptlang/skript/bukkit/loottables/LootTableModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/loottables/LootTableModule.java Outdated
@sovdeeth
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

Comment thread src/main/java/org/skriptlang/skript/bukkit/loottables/LootTableModule.java Outdated
@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jan 28, 2025
Comment thread src/main/java/org/skriptlang/skript/bukkit/loottables/LootTableModule.java Outdated
@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
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
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