Skip to content

Releases: xpple/BetterConfig

Release 2.5.1

22 Dec 17:17

Choose a tag to compare

  • Updated to 1.21.11.

Release 2.5.0

25 Aug 19:36

Choose a tag to compare

  • Added the ability to reload the config at runtime through the API (ModConfig#reload).

Release 2.4.0

15 Jun 16:06

Choose a tag to compare

  • Changed the type of comments from Strings to Components. The value of Config#comment is now the name of a method that provides the comment. For example:
    - @Config(comment = "This is a comment!")
    - public static Object exampleComment = null;
    + @Config(comment = "exampleCommentMethod")
    + public static Object exampleComment = null;
    + private static Component exampleCommentMethod() {
    +     return Component.literal("This is a comment!");
    + }
  • Added two API methods: ModConfig#getDefault and ModConfig#getComment.
  • Updated to Minecraft 1.21.6.

Release 2.3.1

19 Jan 20:08

Choose a tag to compare

  • Replaced modRuntimeOnly with modLocalRuntime in Fabric Gradle build script

Release 2.3.0

17 Jan 14:32

Choose a tag to compare

  • Greatly improved documentation of Config class

Release 2.2.0

15 Jan 15:35

Choose a tag to compare

  • Update JavaDoc to clarify that resetting a config does not use the setter
  • Allow for custom chat representations of config values (#16)

Release 2.1.3

24 Oct 12:33

Choose a tag to compare

  • Fixed a mixin bug causing a crash with some mods

Release 2.1.2

09 Oct 17:06

Choose a tag to compare

  • Added the sources JAR to the publication

Release 2.1.1

09 Oct 14:13

Choose a tag to compare

  • Fixed a bug with ModConfig#resetTemporaryConfigs that could cause a bug when a config is both temporary and readOnly

Release 2.1.0

13 Sep 16:46

Choose a tag to compare

This release introduces two new features and some bug fixes!

  • Added the onChange config attribute (#10). You can now register a function that is called whenever a specific config is updated. For example:
    @Config(onChange = "onChange")
    public static List<String> exampleOnChange = new ArrayList<>(List.of("xpple, earthcomputer"));
    private static void onChange(List<String> oldValue, List<String> newValue) {
        LOGGER.info("exampleOnChange was updated | old: {}, new: {}", oldValue, newValue);
    }
  • Added global change hook (#11). This allows you to register a global function that is called whenever any config is updated. For example:
    new ModConfigBuilder<>("<mod id>", Configs.class)
        .registerGlobalChangeHook(event -> BetterConfigCommon.LOGGER.info("{} was updated | old: {}, new: {}", event.config(), event.oldValue(), event.newValue()))
        .build();
  • Added Tatar translations (#8 by Amirhan-Taipovjan-Greatest-I)