Configuration
ConfigSpec supports booleans, integers, longs, finite doubles, strings, enums, bounded
lists, comments, defaults, custom validators, and sensitive keys. Config handles are
immutable after startup; live reload is outside 1.0.
COMMONandCLIENTfiles use the game config directory.SERVERfiles use the world'sserverconfigdirectory.- Valid unknown entries are retained.
- Invalid known entries alone are replaced with defaults.
- A malformed file is regenerated from defaults.
- Files larger than 1 MiB are backed up and regenerated without being parsed.
- Every repair first creates a UTC-timestamped
.bakcopy. - Failure to back up or atomically replace a file aborts startup.
- Values marked sensitive are never included in warnings.
The runtime parses TOML 1.0 with a relocated TomlJ 1.1.1 and emits stable, ordered TOML itself. Relocation prevents a consumer mod's TomlJ version from colliding with the SDK.