Tags
Creators
Details
2.1.0
Compatibility
Required content
Changes
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

String improvements
- Allow
StringControllerElementto have unlimited text length - When pressing
Deletein a text field whilst text is highlighted, it will act likeBackspacelike it should.
Other changes
- Slightly compacted elements
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:1eAoo2KR:wibQ6TRj"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:1eAoo2KR:wibQ6TRj"
}

