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

Reduce default values of the quest file redux #117

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

WaitingIdly
Copy link
Collaborator

changes in this PR:

  • add default values for most tasks and rewards.
  • when saving to the database, only save non-default values. this reduces the size of the questbook significantly - reportedly around 50% by both Nomifactory and DJ2.
  • deprecate NBTReplaceUtil and add NBTUtil, which simplifies code related to these operations.
  • fix an error where trying to load quests from the new database would error due to simply not clearing current quests (this used to happen when calling QuestDatabase.INSTANCE.readFromNBT(nbt1.getTagList("questDatabase", 10), false);, with the false causes a QuestDatabase.INSTANCE.reset(); to be called. however, due to breaking the database into separate files, this method is no longer called, and reset didnt get copied over).
  • similarly, readded questID, lineID, and order tags to the quest database and questline when running save, as those are called via the writeToNBT methods, which are unused in this context (only used in saveLegacy).
  • update the questbook format from 2.0.0 to 2.1.0.

difference from #109:

  • expanded significantly on what NBTUtil does.
  • added more default things, fixed a few situations where NBT data tags were changed.
  • apply reduction to saving and loading in the new save/load layout.
  • fix some whitespace issues.

supersedes #109

@WaitingIdly WaitingIdly added enhancement New feature or request bugfix Fixes problems labels Jul 6, 2024
@Rongmario Rongmario merged commit deb00b9 into CleanroomMC:1.12 Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes problems enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants