All Mods Resource Packs Data Packs Shaders Modpacks Plugins
S-Lib

S-Lib

by Stalemated • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

S-Lib

S-Lib is a lightweight utility and config library for Minecraft modding.


Example mod: Check out the S-Lib Test Mod repository for complete config usage examples and GUI generation using YACL.


Features

Annotation-Driven Configs

  • Register synced or local configs in a single line of code using SLibConfig.syncedBuilder() or SLibConfig.localBuilder().
  • Network @Sync Options:
    • OVERRIDE_CLIENT: server authoritative config, syncs to the client. Config broadcasts on login and updates in real time. Supports configurable permission checks (e.g., OP-only).
    • INFORM_SERVER: local config, informs server of changes
    • NONE: local config, no network sync
  • Newly added fields are automatically populated with defaults, obsolete keys are removed, and values are clamped to specified ranges when using the annotations @RangeInt, @RangeFloat, and @RangeDouble.
  • Insert comments using the @Comment annotation on top of fields, directly in your config class.
  • Backups are automatically created if file corruption or invalid syntax is detected, preserving the broken config if you accidentally make a mistake.
  • Use the @Nest annotation to allow usage of nested classes for more complex config structures.
  • Use the @Ignore annotation to ignore a field entirely.
  • Built-in type adapters compatible with serialization for AWT's Color, Minecraft's TextColor, Identifier, Pattern, and UUID classes.

Custom YACL Controllers

Custom controllers for YACL:

  • Advanced Color Controller: Supports hex codes (#RRGGBBAA), Minecraft color names, and legacy formatting codes (&a, &3).
  • Item or Tag Controller: Autocomplete dropdown for matching exact items, tags (#c:swords), namespaces (minecraft:*), and regex patterns.
  • Simple Dropdowns: Dropdown selectors for Enums and Strings.

General Utilities

  • Target Matcher Engine: Item matching via exact IDs, tags, namespaces, wildcards (*), and regex (regex:.*_sword).
  • Platform Helpers: Abstractions for loader-specific methods, both as a general utility (PlatformHelper) and for network-related features (NetworkHelper).
  • Math and Color Utils: Easing functions (lerp, ease-out, clamp), text gradient generators, color utilities, and more.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Fabric
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Fabric
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Fabric
1d ago 1
1.20.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.21.1
Fabric
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Neoforge
1d ago 1
1.21.1
Fabric
1d ago 1
1.20.1
Forge
1d ago 1
1.20.1
Fabric
1d ago 1
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 3.0.1+1.21.1

### Fixes

  • Fixed options being saved on disk but not applied to memory when multiple fields are modified at the same time in singleplayer clients
  • Fixed ResolutionException due to incorrect shadowBundle declaration
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 3.0.1+1.21.1

### Fixes

  • Fixed options being saved on disk but not applied to memory when multiple fields are modified at the same time in singleplayer clients
  • Fixed ResolutionException due to incorrect shadowBundle declaration
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 3.0.1+1.20.1

### Fixes

  • Fixed options being saved on disk but not applied to memory when multiple fields are modified at the same time in singleplayer clients
  • Fixed ResolutionException due to incorrect shadowBundle declaration
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 3.0.1+1.20.1

### Fixes

  • Fixed options being saved on disk but not applied to memory when multiple fields are modified at the same time in singleplayer clients
  • Fixed ResolutionException due to incorrect shadowBundle declaration
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 3.0.0+1.21.1

  • This update adds a brand-new and easy-to-use config system!**

### New Features

  • Completely redesigned the config module from the ground up, making registering your configs possible in one line of code using SLibConfig.syncedBuilder() and SLibConfig.localBuilder().
  • Newly added config fields are automatically inserted with default values, old/useless keys are removed.
  • Seven new annotations:
  • @Sync:
  • OVERRIDE_CLIENT: server authoritative config, syncs to the client. Config broadcasts on login and updates in real time. Supports configurable permission checks (e.g., OP-only).
  • INFORM_SERVER: local config, informs server of changes
  • NONE: local config, no network sync
  • @RangeInt: clamps an int config field to a specified range
  • @RangeFloat: clamps a float config field to a specified range
  • @RangeDouble: clamps a double config field to a specified range
  • @Comment: allows for comments to be added to config fields (supports text blocks)
  • @Ignore: ignores a config field entirely
  • @Nest: allows for nested classes for more complex config structures
  • Unmodded / Vanilla server compatibility: client instances safely fall back to default values for server authoritative options. Local options can be freely modified.
  • The config also supports serializing common classes like AWT's Color, Minecraft's TextColor, Identifier, Pattern, and UUID.

### Fixes
  • Fixed availability propagation in custom YACL controllers

### Testing
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 3.0.0+1.21.1

  • This update adds a brand-new and easy-to-use config system!**

### New Features

  • Completely redesigned the config module from the ground up, making registering your configs possible in one line of code using SLibConfig.syncedBuilder() and SLibConfig.localBuilder().
  • Newly added config fields are automatically inserted with default values, old/useless keys are removed.
  • Seven new annotations:
  • @Sync:
  • OVERRIDE_CLIENT: server authoritative config, syncs to the client. Config broadcasts on login and updates in real time. Supports configurable permission checks (e.g., OP-only).
  • INFORM_SERVER: local config, informs server of changes
  • NONE: local config, no network sync
  • @RangeInt: clamps an int config field to a specified range
  • @RangeFloat: clamps a float config field to a specified range
  • @RangeDouble: clamps a double config field to a specified range
  • @Comment: allows for comments to be added to config fields (supports text blocks)
  • @Ignore: ignores a config field entirely
  • @Nest: allows for nested classes for more complex config structures
  • Unmodded / Vanilla server compatibility: client instances safely fall back to default values for server authoritative options. Local options can be freely modified.
  • The config also supports serializing common classes like AWT's Color, Minecraft's TextColor, Identifier, Pattern, and UUID.

### Fixes
  • Fixed availability propagation in custom YACL controllers

### Testing
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 3.0.0+1.20.1

  • This update adds a brand-new and easy-to-use config system!**

### New Features

  • Completely redesigned the config module from the ground up, making registering your configs possible in one line of code using SLibConfig.syncedBuilder() and SLibConfig.localBuilder().
  • Newly added config fields are automatically inserted with default values, old/useless keys are removed.
  • Seven new annotations:
  • @Sync:
  • OVERRIDE_CLIENT: server authoritative config, syncs to the client. Config broadcasts on login and updates in real time. Supports configurable permission checks (e.g., OP-only).
  • INFORM_SERVER: local config, informs server of changes
  • NONE: local config, no network sync
  • @RangeInt: clamps an int config field to a specified range
  • @RangeFloat: clamps a float config field to a specified range
  • @RangeDouble: clamps a double config field to a specified range
  • @Comment: allows for comments to be added to config fields (supports text blocks)
  • @Ignore: ignores a config field entirely
  • @Nest: allows for nested classes for more complex config structures
  • Unmodded / Vanilla server compatibility: client instances safely fall back to default values for server authoritative options. Local options can be freely modified.
  • The config also supports serializing common classes like AWT's Color, Minecraft's TextColor, Identifier, Pattern, and UUID.

### Fixes
  • Fixed availability propagation in custom YACL controllers

### Testing
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 3.0.0+1.20.1

  • This update adds a brand-new and easy-to-use config system!**

### New Features

  • Completely redesigned the config module from the ground up, making registering your configs possible in one line of code using SLibConfig.syncedBuilder() and SLibConfig.localBuilder().
  • Newly added config fields are automatically inserted with default values, old/useless keys are removed.
  • Seven new annotations:
  • @Sync:
  • OVERRIDE_CLIENT: server authoritative config, syncs to the client. Config broadcasts on login and updates in real time. Supports configurable permission checks (e.g., OP-only).
  • INFORM_SERVER: local config, informs server of changes
  • NONE: local config, no network sync
  • @RangeInt: clamps an int config field to a specified range
  • @RangeFloat: clamps a float config field to a specified range
  • @RangeDouble: clamps a double config field to a specified range
  • @Comment: allows for comments to be added to config fields (supports text blocks)
  • @Ignore: ignores a config field entirely
  • @Nest: allows for nested classes for more complex config structures
  • Unmodded / Vanilla server compatibility: client instances safely fall back to default values for server authoritative options. Local options can be freely modified.
  • The config also supports serializing common classes like AWT's Color, Minecraft's TextColor, Identifier, Pattern, and UUID.

### Fixes
  • Fixed availability propagation in custom YACL controllers

### Testing
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.1.1+1.21.1

### Fix
  • Fixed NeoForge version not letting the user login to servers if the mod is not installed server-side
  • New behavior should allow the client to join as usual

### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.1.1+1.21.1

  • This release DOES NOT affect the Fabric version. It was only uploaded for version parity**

### Fix
  • Fixed NeoForge version not letting the user login to servers if the mod is not installed server-side
  • New behavior should allow the client to join as usual
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.1.1+1.20.1

  • This release DOES NOT affect the Fabric version. It was only uploaded for version parity**

### Fix
  • Fixed Forge version not letting the user login to servers if the mod is not installed server-side and the player has a server-side mod that depends on it installed on the client
  • New behavior should allow the client to join but make the server-side features of the mod unusable
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.1.1+1.20.1

### Fix
  • Fixed Forge version not letting the user login to servers if the mod is not installed server-side and the player has a server-side mod that depends on it installed on the client
  • New behavior should allow the client to join but make the server-side features of the mod unusable
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.1.0+1.21.1

### Features

  • Created SyncedConfigManager, a specialized ConfigManager that handles network sync between client and server configs
  • It allows for custom permissions to edit configs in game (such as OP only, etc...)
  • Same syntax as the recently added BaseConfigManager class (or even simpler)
  • Whenever a config file is edited in a server, the config applies instantly and gets automagically sent to all players

### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.1.0+1.21.1

### Features

  • Created SyncedConfigManager, a specialized ConfigManager that handles network sync between client and server configs
  • It allows for custom permissions to edit configs in game (such as OP only, etc...)
  • Same syntax as the recently added BaseConfigManager class (or even simpler)
  • Whenever a config file is edited in a server, the config applies instantly and gets automagically sent to all players

### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.1.0+1.20.1

### Features

  • Created SyncedConfigManager, a specialized ConfigManager that handles network sync between client and server configs
  • It allows for custom permissions to edit configs in game (such as OP only, etc...)
  • Same syntax as the recently added BaseConfigManager class (or even simpler)
  • Whenever a config file is edited in a server, the config applies instantly and gets automagically sent to all players

### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.1.0+1.20.1

### Features

  • Created SyncedConfigManager, a specialized ConfigManager that handles network sync between client and server configs
  • It allows for custom permissions to edit configs in game (such as OP only, etc...)
  • Same syntax as the recently added BaseConfigManager class (or even simpler)
  • Whenever a config file is edited in a server, the config applies instantly and gets automagically sent to all players

### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.0.1+1.21.1

### Fix
  • Fixed race condition in NeoForge making modded items not match when matching exact items using ItemStrategy
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.0.1+1.21.1

### Fix
  • Fixed race condition in NeoForge making modded items not match when matching exact items using ItemStrategy
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.0.1+1.20.1

### Fix
  • Fixed race condition in Forge making modded items not match when matching exact items using ItemStrategy
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.0.1+1.20.1

### Fix
  • Fixed race condition in Forge making modded items not match when matching exact items using ItemStrategy
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.0.0+1.21.1

### Major Architecture Changes & Features

  • Serverside Support:** S-Lib is no longer a clientside exclusively mod! The entire architecture has been refactored to run on both clients and servers.
  • Cross-Platform Networking API:** Introduced NetworkHelper, a multi loader abstraction to send and receive packets between clients and servers.
  • Developer Experience & Cleanup:**
  • Added complete Javadocs to PlatformHelper and NetworkHelper.
  • Cleaned up redundant multi-loader initialization classes (e.g., completely purged the functionally useless SLibClient class).
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 2.0.0+1.21.1

### Major Architecture Changes & Features

  • Serverside Support:** S-Lib is no longer a clientside exclusively mod! The entire architecture has been refactored to run on both clients and servers.
  • Cross-Platform Networking API:** Introduced NetworkHelper, a multi loader abstraction to send and receive packets between clients and servers.
  • Developer Experience & Cleanup:**
  • Added complete Javadocs to PlatformHelper and NetworkHelper.
  • Cleaned up redundant multi-loader initialization classes (e.g., completely purged the functionally useless SLibClient class).
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.0.0+1.20.1

### Major Architecture Changes & Features

  • Serverside Support:** S-Lib is no longer a clientside exclusively mod! The entire architecture has been refactored to run on both clients and servers.
  • Cross-Platform Networking API:** Introduced NetworkHelper, a multi loader abstraction to send and receive packets between clients and servers.
  • Developer Experience & Cleanup:**
  • Added complete Javadocs to PlatformHelper and NetworkHelper.
  • Cleaned up redundant multi-loader initialization classes (e.g., completely purged the functionally useless SLibClient class).
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 2.0.0+1.20.1

### Major Architecture Changes & Features

  • Serverside Support:** S-Lib is no longer a clientside exclusively mod! The entire architecture has been refactored to run on both clients and servers.
  • Cross-Platform Networking API:** Introduced NetworkHelper, a multi loader abstraction to send and receive packets between clients and servers.
  • Developer Experience & Cleanup:**
  • Added complete Javadocs to PlatformHelper and NetworkHelper.
  • Cleaned up redundant multi-loader initialization classes (e.g., completely purged the functionally useless SLibClient class).
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 1.0.6+1.21.1

### Features

  • Added an easy way to register keybinds for both Fabric and NeoForge (PlatformHelper.registerKeyBinding(KeyBinding keyBinding);)
  • Added 3 different easing functions (lerp, ease out cubic, ease out expo) to MathUtils
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 1.0.6+1.21.1

### Features

  • Added an easy way to register keybinds for both Fabric and NeoForge (PlatformHelper.registerKeyBinding(KeyBinding keyBinding);)
  • Added 3 different easing functions (lerp, ease out cubic, ease out expo) to MathUtils
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 1.0.6+1.20.1

### Features

  • Added an easy way to register keybinds for both Fabric and Forge (PlatformHelper.registerKeyBinding(KeyBinding keyBinding);)
  • Added 3 different easing functions (lerp, ease out cubic, ease out expo) to MathUtils
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.20.1/Changelog.md)

## 1.0.6+1.20.1

### Features

  • Added an easy way to register keybinds for both Fabric and Forge (PlatformHelper.registerKeyBinding(KeyBinding keyBinding);)
  • Added 3 different easing functions (lerp, ease out cubic, ease out expo) to MathUtils
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 1.0.5+1.21.1

### Feature

  • Added color formatting (red) for the new Not Strategy in the ItemOrTagController
### [Full Changelog](https://github.com/Stalemated/s-lib/blob/1.21.1/Changelog.md)

## 1.0.5+1.21.1

### Feature

  • Added color formatting (red) for the new Not Strategy in the ItemOrTagController
S-Lib Icon
Download S-Lib
Select game version
Select platform