Tags
Creators
Details
All versions
General-purpose utility functions added to
Expanded
1.1.0
Beta
ChosenLib 1.1.0last year 20
Compatibility
Minecraft: Java Edition
1.21.1
Platform
Fabric
Supported environments
Client-side
Server-side
Required content
Any compatible version
Changes
ChosenLib v1.1.0 – Changelog
New in this release
General-purpose utility functions added to ChosenLib
randomInt(int min, int max): Get a random integer in a range.clamp(int value, int min, int max): Clamp a value between min and max.lerp(double a, double b, double t): Linear interpolation between two values.isBetween(int value, int min, int max): Check if a value is within a range.safeEquals(Object a, Object b): Null-safe equality check.debugLog(String message): Log debug messages with the mod logger.
Expanded TextUtils with new helpers
capitalize(String input): Capitalize the first letter of a string.repeat(String str, int times): Repeat a string multiple times.isNullOrEmpty(String str): Check if a string is null or empty.join(String separator, String... elements): Join strings with a separator.
Documentation
- README updated with usage examples for all new functions.
No breaking changes. Code is fully documented and ready for use in your Fabric mods!
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:UgEg5PFW:Dnwt0Trk"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:UgEg5PFW:Dnwt0Trk"
}

