Tags
Creators
Details
2.0.0
Compatibility
Required content
Changes
Features:
- Unified client-server config handling
-
- SERVER_ONLY and SYNCED values sync automatically between server and client.
-
- CLIENT_ONLY values display locally while protecting server-controlled values.
-
- getDisplayValues() combines server and client values for UI use.
- Improved ConfigScreen UI
-
- Read-only highlighting for server-synced values.
-
- Boolean buttons now indicate current value.
-
- Sliders respect read-only states and update pending edits.
-
- Text fields indicate inactive state for server-controlled values.
- Robust networking
-
- Updated S2C and C2S payloads for config sync.
-
- Detects OP status and singleplayer automatically.
-
- Null-safe sync prevents “Invalid Player Data” crashes.
-
- Server sync runs on client main thread.
- Full singleplayer compatibility
-
- Integrated singleplayer server safely syncs configs to client.
-
- Prevents NullPointerException when configs are missing on client.
Bug Fixes:
- Boolean buttons no longer appear inactive incorrectly.
- Server-only configs sync correctly in singleplayer.
- Fixed NullPointerException when client joins without a registered config.
- Fixed text field rendering for server-controlled values.
- Fixed sliders failing to update pendingEdits for integer and float configs.
Major Changes:
ModInitialisers must now have a S2C sync ServerPlayConnectionEvents.JOIN.register after all config registrations, look at the serpentine mod initialiser for it.
expect() now has 3 inputs:
Key - (string) the entry's key [was already in 1.7.0] DefaultValue - (Object) the fallback value if it is unable to find it [was already in 1.7.0] Side - (SyncSide) which type of entry should it be [new in 2.0.0]
SyncSide is a new protected struct inside of the Config class, is has: SERVER_ONLY - the expect entry will only be editable on a server by an opped user. CLIENT_ONLY - the expect entry will only be seen by the user, no server can touch it. SYNCED - the expect entry will be read-only, even to opped users. Can only be edited on the host machine's scnf file.
Upgrade Instructions:
- Mark server-only fields as SyncSide.SERVER_ONLY and client-only fields as SyncSide.CLIENT_ONLY.
- Add applyServerEdit method, example here
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:Rrf04pT3:28tu0pfd"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:Rrf04pT3:28tu0pfd"
}

