Cryonic Config
Universal Configuration Management Tool
Cryonic Config is a convenient tool for managing mod settings that features minimal dependency on other components and easy portability between different Minecraft versions. The main focus is on ease of use and solution portability.
How the System Works
All configuration files are saved in JSON format in the {minecraft_dir}/config folder under names like "mod_id.json". During initial loading, the system reads all configuration files through a dictionary specified in "cryonicconfig.json".
Settings can only be changed by directly editing JSON files — no graphical interface for configuration is provided. To ensure convenient synchronization between client and server, synchronized variables are transmitted directly to the player through chat and intercepted by the system.
API Usage
Adding Dependency in Groovy (build.gradle)
Add Maven repository:
repositories {
maven { url "https://api.modrinth.com/maven" }
}
For modern versions and Architectury (replace ${project.name} with fabric, forge, or neoforge):
dependencies {
modImplementation "maven.modrinth:cryonicconfig:fabric-${project.name}:1.0.0+mc${rootProject.minecraft_version}"
}
For version b1.7.3:
dependencies {
modImplementation "maven.modrinth:cryonicconfig:babric:1.0.0+mcb1.7.3"
}
Basic Usage
// Getting configuration for a mod (can be called anywhere)
ConfigStorage config = CryonicConfig.getConfig("mod_id");
// Supports integers, floating-point numbers, boolean values, and strings
// When getting a value, the default value is also set
// Getter format: (variable name, default value)
// Variable names cannot be reused — they will be overwritten
config.getInt("varName", 3);
config.getDouble("name", 3.3);
config.getBoolean("var", true);
config.getString("str", "Geronimo!");
// The variable will be available locally on client and server
// For a connected server player to use server configuration
// synchronization must be performed
config.sync("varName", playerEntity);
// You can also use the compact format:
CryonicConfig.getConfig("mod_id").getInt("varName", 3);
// Manual value setting instead of automatic generation through get
// Useful for overriding old values
config.setInt("varName", 3);
config.setDouble("name", 3.3);
config.setBoolean("var", true);
config.setString("str", "Geronimo!");
Specifying Dependencies
In fabric.mod.json:
{
"depends": {
"cryonicconfig": "*"
}
}
In mods.toml/neoforge.mods.toml:
[[dependencies.cryonicconfig]]
modId = "cryonicconfig"
type = "required"
versionRange = "[0,)"