promotional bannermobile promotional banner

ChosenLib

ChosenLib: a lightweight utility library for Fabric
Back to Files

chosenlib v1.1.0

File namechosenlib-1.1.0.jar
Uploader
urmoiturmoit
Uploaded
Aug 30, 2025
Downloads
12
Size
16.7 KB
Mod Loaders
Fabric
File ID
6944572
Type
B
Beta
Supported game versions
  • 1.21.1

Curse Maven Snippet

Fabric

modImplementation "curse.maven:chosenlib-1336567:6944572"

Learn more about Curse Maven

What's new

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!

This mod has no additional files