YetAnotherConfigLib

YetAnotherConfigLib (yacl) is just that. A builder-based configuration library for Minecraft.

LGPL-3.0 License

Stars
79

Bot releases are visible (Hide)

YetAnotherConfigLib - v3.0.1+1.19.4

Published by isXander over 1 year ago

  • Fix an unavoidable crash when opening any list
  • Fix a crash when loading YACL images
YetAnotherConfigLib - v3.0.0+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib v3

3.0 of YACL introduces a new UI layout, taking advantage of 1.19.4's new tab system!

Description Panel

The description panel takes the place of the old category buttons, you can now interact with the text by clicking or hovering and the description can contain an animated WebP file or a static image. This can help you as a developer to portray what your option does with an actual example.
Like the old tooltip system, these descriptions can dynamically change based on the value of the option, including the image.
After a few seconds of hovering, the description will start to auto-scroll if necessary so inputs such as controller can still use the UI.

.description(OptionDescription.createBuilder()
        .text(Text.literal("Line 1"))
        .text(Text.literal("Line 2"))
        .webpImage(new Identifier("mymod", "config/screenshots/config_example.webp"))
        .build())

the above is applicable to both groups and options

Tab System

YACL now uses a slightly modified version of 1.19.4's new create world screen, this adds tab overflow, so you can scroll through the tabs in case there are too many to fit on the screen.

Controller Builders

Controllers now use a builder system, rather than using constructors. This allows for more flexibility in the future.
You can still use your own controller implementations without creating a builder, using .customController().

For mod developers...

This update is for both 1.19.4 and 1.20, there is complete API parity. 1.20 is now the active branch,
and 1.19.4 is now considered LTS and may receive features from 1.20 at a later date.

For users/modpack developers...

YACL 3.0 includes the old 2.x inside the new JAR. So you can safely upgrade to 3.0 without breaking
mods that have not yet updated. However, the old UI will still be present for this outdated mods.

YetAnotherConfigLib - v3.0.0+1.19.4

Published by isXander over 1 year ago

YetAnotherConfigLib v3

3.0 of YACL introduces a new UI layout, taking advantage of 1.19.4's new tab system!

Description Panel

The description panel takes the place of the old category buttons, you can now interact with the text by clicking or hovering and the description can contain an animated WebP file or a static image. This can help you as a developer to portray what your option does with an actual example.
Like the old tooltip system, these descriptions can dynamically change based on the value of the option, including the image.
After a few seconds of hovering, the description will start to auto-scroll if necessary so inputs such as controller can still use the UI.

.description(OptionDescription.createBuilder()
        .text(Text.literal("Line 1"))
        .text(Text.literal("Line 2"))
        .webpImage(new Identifier("mymod", "config/screenshots/config_example.webp"))
        .build())

the above is applicable to both groups and options

Tab System

YACL now uses a slightly modified version of 1.19.4's new create world screen, this adds tab overflow, so you can scroll through the tabs in case there are too many to fit on the screen.

Controller Builders

Controllers now use a builder system, rather than using constructors. This allows for more flexibility in the future.
You can still use your own controller implementations without creating a builder, using .customController().

For mod developers...

This update is for both 1.19.4 and 1.20, there is complete API parity. 1.20 is now the active branch,
and 1.19.4 is now considered LTS and may receive features from 1.20 at a later date.

For users/modpack developers...

YACL 3.0 includes the old 2.x inside the new JAR. So you can safely upgrade to 3.0 without breaking
mods that have not yet updated. However, the old UI will still be present for this outdated mods.

YetAnotherConfigLib - v3.0.0-beta.2+1.19.4

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0.0-beta.2+1.19.4

This version adds no features, nor bug fixes, instead it implements a breaking change:

The YACL package has changed to dev.isxander.yacl3 and the YACL mod-id has changed to yet_another_config_lib_v3.
This is to prevent conflicts with 2.0, so you can load both versions at the same time so older mods don't break.

YetAnotherConfigLib - v3.0.0-beta.7+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0.0-beta.7+1.20

This version adds no features, nor bug fixes, instead it implements a breaking change:

The YACL package has changed to dev.isxander.yacl3 and the YACL mod-id has changed to yet_another_config_lib_v3.
This is to prevent conflicts with 2.0, so you can load both versions at the same time so older mods don't break.

YetAnotherConfigLib - v3.0.0-beta.1+1.19.4

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0 Beta 1 (for 1.19.4)

This release is parity with 3.0.0-beta.6 for 1.20.

Unfortunately, 3.0 will only be available for 1.19.4 and up, not 1.19.2. This is because YACL
now highly depends on .4's new tab system (found in the create new world screen).

If there is a high enough demand for a backport to 1.19.2, I will consider it, but no promises!

YetAnotherConfigLib - v3.0.0-beta.6+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0 Beta 6

Bug Fixes

  • Fix reading of some lossy animated WebP images.
YetAnotherConfigLib - v3.0.0-beta.5+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0 Beta 5

API Changes

  • OptionDescription.Builder#description has been renamed to text, to make it more clear as it used to look like:
    .description(OptionDescription.createBuilder()
            .description(Component.literal("This is some text"))
            .build()) 
    
  • ListOption.createBuilder now no longer takes a class parameter, to match with Option. This means you can no longer
    do ListOption.createBuilder(String.class), instead you should do ListOption.<String>createBuilder().

Bug Fixes

  • Fixed option list entries sometimes appearing on top of the navbar.
YetAnotherConfigLib - v3.0.0-beta.4+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib 3.0 Beta 4

Additions

  • Added OptionDescription.Builder.customImage() to add your own renderer for the option description.

API Changes

This release brings a few API breakages, getting them out the way, as it is a major update.

  • All controllers now have an API builder for creating them. This is to make it easier to add
    more options to them in the future. This also creates a new API layer to remove simple implementations of YACL
    from using the GUI package. The old constructors are still available and you can pass your own controller
    with .customController(). An example would be .controller(TickBoxControllerBuilder::create) or:
    .controller(opt -> IntegerSliderControllerBuilder.create(opt)
            .range(0, 10)
            .step(1))
    
  • Completely removed .tooltip() from groups and options. You should use .description() instead.
    To make this a little easier, OptionDescription.of(Component...) has been added so you don't need to
    create a builder.
  • Removed OptionDescription.Builder.name(Component) as it now just uses the option name.

Bug Fixes

  • Fixed option descriptions being stuck on the last clicked option when not hovering.
  • Fixed category tooltips not being displayed with the new tabs.
YetAnotherConfigLib - v3.0.0-beta.2+1.20

Published by isXander over 1 year ago

YetAnotherConfigLib v3 Beta 2

Changes

  • List options now use the new option descriptions
  • All options now print a warning if using the old tooltip system

Bug Fixes

  • Fix animated images sometimes rendering incorrectly
  • Fix animated images flickering when reaching end of loop
YetAnotherConfigLib - v3.0.0-beta.1+1.20

Published by isXander over 1 year ago

No changelog provided.

YetAnotherConfigLib - v2.5.1-beta.1+1.20

Published by isXander over 1 year ago

No changelog provided.

YetAnotherConfigLib - v2.5.1+1.19.4

Published by isXander over 1 year ago

  • Improve button compatibility with Controlify
YetAnotherConfigLib - v2.5.0+1.19.4

Published by isXander over 1 year ago

No changelog provided.

YetAnotherConfigLib - v2.4.2

Published by isXander over 1 year ago

  • Prioritised tooltip rendering to above the option rather than below.
  • Fix empty tooltips rendering a newline.
YetAnotherConfigLib - v2.4.1

Published by isXander over 1 year ago

Features

  • OptionGroup.Builder and ConfigCategory.Builder now extend OptionAddable so you can abstractly
    add options to either of them.

API Changes

  • Deprecated the varargs tooltip builder method in Option.Builder due to unsafe varargs. There is now
    an equivalent that is not varargs but a single function.
YetAnotherConfigLib - v2.4.0

Published by isXander over 1 year ago

Features

  • New builder API for GsonConfigInstance, deprecated the constructors.

Bug Fixes

  • Fixed StringControllers not focusing properly since 2.3.1 (#58).
  • Fixed resetting a StringController sometimes crashing the game (#57).
  • Fix ListOption.Builder not exposing listener() like in Option.Builder (#55).
YetAnotherConfigLib - v2.3.1

Published by isXander over 1 year ago

  • Fix buttons stuck focusing after clicking the mouse.
YetAnotherConfigLib - v2.3.0

Published by isXander over 1 year ago

  • Update to 1.19.4
YetAnotherConfigLib - v2.2.0-for-1.19.2

Published by isXander over 1 year ago

Backported YACL 2.2.0 to 1.19.2

Due to breaking JAR compatibility in an earlier version of YACL, mods that support YACL for
1.19.3 can no longer support 1.19.2. This is a backport of YACL 2.2.0 to 1.19.2 to allow mods to
support it.

My stance on backporting

Personally, I hate to backport my mods. When breaking changes are made in Minecraft between versions,
the code of the mod has to be changed to support the new version, making the older version of MC incompatible.
If you want to support multiple versions of Minecraft, you have to maintain multiple branches of the mod, which
is a lot of work for just one person, and I don't have the time to do that.

This is a one-off backport, and I will not be backporting any future versions of YACL to 1.19.2. If you want to
support and use new features of YACL in your mod, you will have to drop support for 1.19.2.

Badges
Extracted from project README
Java 17 Discord Modrinth CurseForge Ko-fi