Syrup Library
Syrup Library supplies a JSON5 config system for mods. Each config value has a specified Java data type.
The config system can:
- Create a config file from a specification.
- Add comments to a new config file.
- Load and validate values.
- Add missing values to an existing file.
- Reload values while the game is open.
- Keep restart-required values unchanged until the next game start.
- Keep the last valid values active if a file does not load.
The same config code works with all supported mod loaders.
Teleport documentation
Use the teleport guide to capture locations and teleport players.
Add Syrup Library
For Fabric and Minecraft 1.20.1, these examples use repository target version
0.5.1+1.20.1-fabric.
Add the Syrup Studios Maven repository and the dependency to your build.gradle.kts file:
repositories {
maven("https://maven.syrupstudios.net/releases/")
}
dependencies {
modImplementation("net.syrupstudios:syrup_library:0.5.1+1.20.1-fabric")
}
Also add Syrup Library to the depends object in fabric.mod.json:
{
"depends": {
"fabricloader": ">=0.19.2",
"minecraft": "1.20.1",
"java": ">=17",
"syrup_library": ">=0.5.1"
}
}
Users must install Syrup Library with your mod.
If you use the old typed API, stay on version 0.2.0, or migrate and rebuild against ConfigValue<T>.
Other guides
- Commands: declare command names, aliases, and permissions.
- Item data: read and update custom item data safely.
- Player profiles: resolve and cache player profiles.
Config documentation
Use the config guide to create and use configs in your mod.