Skip to content

Releases: isXander/YetAnotherConfigLib

v2.4.1

Choose a tag to compare

@isXander isXander released this 15 Apr 21:23

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.

v2.4.0

Choose a tag to compare

@isXander isXander released this 04 Apr 10:32

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).

v2.3.1

Choose a tag to compare

@isXander isXander released this 29 Mar 16:12
  • Fix buttons stuck focusing after clicking the mouse.

v2.3.0

Choose a tag to compare

@isXander isXander released this 15 Mar 18:08
  • Update to 1.19.4

v2.2.0-for-1.19.2

Choose a tag to compare

@isXander isXander released this 23 Jan 18:22

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.

v2.2.0

Choose a tag to compare

@isXander isXander released this 25 Dec 13:51

User Changes

  • New List is empty text when lists are empty
  • Fix category buttons sometimes not being clickable when you can scroll
  • Fix the list add button not disabling when lists are disabled
  • Fix the option list background not quite reaching the edge of the screen.

Developer Changes

  • New LabelOption for shorthand to making labels!
  • Log when option bindings don't match up after using their save function
  • Internally move YACLScreen button actions into separate methods for future features :o
  • Fully publish sources jar & javadoc jar now that the loom plugin is fixed.

v2.1.1

Choose a tag to compare

@isXander isXander released this 14 Dec 18:56
  • Remove padding between list items
  • No longer hide add and reset buttons when lists are collapsed, but automatically expand them when clicked
  • Fix removing items from lists didn't update up and down buttons
  • Fix lists not updating properly when removing the final item from a list
  • Refactor some gui list code to abstract all list functionality from main gui classes
  • Fix option entries sometimes overlapping due to the reset button
  • Fix string elements cropping 1px off the top of the text
  • Abstracted builders to restrict API usage

v2.1.0

Choose a tag to compare

@isXander isXander released this 11 Dec 19:49

Lists

Implements mutable list options where you can create, remove and shift entries in a list.

API

Lists hack option groups with their own implementation for this, so each individual list takes form as a whole option group.

ListOption.createBuilder(String.class)
    .name(Text.of("List Option"))
    .binding(/* gets and sets a List, requires list field to be not final, does not manipulate the list */)
    .controller(StringController::new) // usual controllers, passed to every entry
    .initial("") // when adding a new entry to the list, this is the initial value it has
    .build()

Implementation details

When implementing this, it was vital to me that all controllers work with lists, not ones specifically designed
for list entries. This was achieved quite easily by having each entry being its own option with an empty name and tooltip with its own controller, that pairs with its list "parent" to actually modify the option.

Option groups were taken advantage of and hacked into its own option, only minor changes had to be made to get this
to work with value application.

Applicable controllers have been modified to expand their inputs to near full width when no name is present.

Screenshots

screenshot

String improvements

  • Allow StringControllerElement to have unlimited text length
  • When pressing Delete in a text field whilst text is highlighted,
    it will act like Backspace like it should.

Other changes

  • Slightly compacted elements

v2.0.0

Choose a tag to compare

@isXander isXander released this 07 Dec 16:11
  • Update to 1.19.3
  • Colour field controllers
  • Better carot positioning when clicking in text fields
  • Better text selection for text fields
  • Smooth scrolling for category list
  • Fix category list scrollbar appearing under option list background in-game
  • Fix tick box name text length limiting

v1.7.1

Choose a tag to compare

@isXander isXander released this 14 Nov 21:16
  • Breaking change: GsonConfigInstance now only serializes fields annotated with @ConfigEntry to prevent strange GSON problem.