Add the TPUtils#getRequiredXpLevelsToTp function
Fix config not being written from the chat
Fix translations when using the CyanLibConfigCommands + the config screen for each mod now only has a 'Done' button, the options are automatically saved when exiting the screen
The functions that were rewritten for each type of option are now a single function.
This was made using a new interface called Option<T>
, where T
is the type of object the options will store
Use classes instead of a HashMap to store the options
🚧 Fixed :
- Crash on server launch (due to missing annotation
@Environment(EnvType.CLIENT)
) - Function
hasRule(String optionName, RULES rule)
was only checking for rules inInteger
options, notBoolean
ones
🫧 Changed :
MsgToActionBar
andMinOpLvlEditConfig
options are now centralized in this library, not each mod using this library
✏️ Added :
- A screen for the configuration (only works for the client options, but a screen will come to edit the server's options)
- The screen can be opened via ModMenu or in-game (not in a menu) using the default key
c
🚧 Fixed :
- If an option file was present (for a mod using this library) and contained options that were not in the default options, they were kept in the options
- If an option was in the default options but not in the options file, it was not added to the options
- When an option with the rule LOAD_CUSTOM_TRANSLATIONS was not exactly named "useCustomTranslations", the instances were not created correctly and the custom translations were not loaded correctly
🫧 Changed :
- Entirely remade the config system to use a
class
instead of aMap
(which make it usable with screens)