refactor: use configurate for config #6

Manually merged
amy merged 1 commit from amy/chomensmod:1.20.1 into 1.20.1 2025-01-01 19:58:22 -05:00
amy commented 2024-12-31 19:05:50 -05:00
Contributor

Lots of changes here. Needs thorough testing (with pre-existing configs) before merging.

I don't expect you to merge this, it's a pretty big change and you might not really like Configurate's API.
However, this should allow for easy config version migrations. I may implement this in a future PR.

Changes:

  • The default config is now automatically generated from the Configuration class

This leads to the default config format being a bit ugly, as BlockPos fields will take up one line per field, instead of being on the same line.
Additionally, the "key" field on the BotInfo class is not explicitly set to null on the config. I am not sure if there is a way to fix this.

  • The CustomChat format is now deserialized as a Component

This means it's automatically validated when loading the config. Hopefully, this won't break any existing configs. The idea is to replace the custom placeholders with something like {"selector":"@s"} in the future.

Lots of changes here. Needs thorough testing (with pre-existing configs) before merging. I don't expect you to merge this, it's a pretty big change and you might not really like Configurate's API. However, this should allow for easy config version migrations. I may implement this in a future PR. Changes: - The default config is now automatically generated from the Configuration class This leads to the default config format being a bit ugly, as BlockPos fields will take up one line per field, instead of being on the same line. Additionally, the "key" field on the BotInfo class is not explicitly set to null on the config. I am not sure if there is a way to fix this. - The CustomChat format is now deserialized as a Component This means it's automatically validated when loading the config. Hopefully, this won't break any existing configs. The idea is to replace the custom placeholders with something like `{"selector":"@s"}` in the future.
amy added 1 commit 2024-12-31 19:05:50 -05:00
amy manually merged commit 1d09eab935 into 1.20.1 2025-01-01 19:58:22 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ChomeNS/chipmunkmod#6
No description provided.