YetAnotherConfigLib (yacl) is just that. A builder-based configuration library for Minecraft.
LGPL-3.0 License
Bot releases are hidden (Show)
Published by isXander almost 2 years ago
List is empty
text when lists are emptyLabelOption
for shorthand to making labels!Published by isXander almost 2 years ago
Published by isXander almost 2 years ago
Implements mutable list options where you can create, remove and shift entries in a list.
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()
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.
StringControllerElement
to have unlimited text lengthDelete
in a text field whilst text is highlighted,Backspace
like it should.Published by isXander almost 2 years ago
Published by isXander almost 2 years ago
GsonConfigInstance
now only serializes fields annotated with @ConfigEntry
to prevent strange GSON problem.Published by isXander almost 2 years ago
Dimension
into Dimension
and MutableDimension
dim
private in AbstractWidget
so mods can't change the dimension without setDimension
isPendingValueDefault
to check if pending value is equal to default value of bindingOption#requestSetDefault
and Option#forgetPendingValue
implementations weren't notifying listenersPublished by isXander about 2 years ago
Published by isXander about 2 years ago
availableValues
to be passed to EnumController
Published by isXander about 2 years ago
Published by isXander about 2 years ago
Published by isXander about 2 years ago
StringControllerElement
methods to be inheritablePublished by isXander about 2 years ago
Published by isXander about 2 years ago
Published by isXander about 2 years ago
ButtonOption
now consumes itself, so you can access it when building.Option#available
mutable with Option#setAvailable
Published by isXander about 2 years ago
PlaceholderCategory
: A category that when selected, just opens a screeninstant
property for option builders: makes the option apply instantly instead of when pressing "Apply"Published by isXander about 2 years ago
Published by isXander about 2 years ago
Published by isXander about 2 years ago
Published by isXander about 2 years ago
Published by isXander about 2 years ago