Jsonate
Managing configuration files is one of those tasks every Minecraft mod developer eventually faces, and it is rarely the fun part of the project. Jsonate exists to change that. This lightweight API takes the pain out of handling JSON-based configuration files, letting you focus on gameplay features instead of wrestling with serialization code. Whether you are building a small quality-of-life mod or a sprawling tech overhaul, Jsonate keeps your settings organized, versioned, and easy to read.
What Is Jsonate?
Jsonate is a compact library that provides an intuitive way to create, load, and manage JSON configuration files inside your Minecraft mods. Instead of writing boilerplate parsing logic by hand, you define your settings in a clean, chainable format and let the library handle the rest. It manages versioning, automatic file creation, and data type conversions seamlessly, so your config system works reliably from the first launch.
The add-on is designed for simplicity and efficiency. It does not bloat your project with unnecessary dependencies, and it does not force you into a complicated setup process. If you prefer to keep things minimal, you can even skip adding it as a dependency entirely by copying the JsonConfig class straight into your project template.
Key Features of Jsonate for Minecraft
- Automatic file creation: The config file is generated on first run with sensible defaults, so players never see a missing-file error.
- Built-in versioning: A version field is stored inside the JSON, making it easy to detect outdated configs and migrate them safely.
- Type conversion: Integers, booleans, and lists are read and written without manual casting.
- Static access pattern: Retrieve values once and store them in static fields for fast, repeated access.
- Predictable paths: Files are saved to the standard .minecraft/config/ directory using your mod ID as the filename.
Supported Minecraft Versions and Loaders
Jsonate is built to work across modern Minecraft releases, including the 1.20.x and 1.21.x branches, and it plays nicely with both Fabric and NeoForge mod development environments. Because the library focuses on plain JSON handling rather than loader-specific APIs, it integrates cleanly into whatever modloader your project targets. If you are maintaining a multi-version codebase, this portability saves considerable time.
A Quick Usage Example
Getting started is straightforward. You create a config instance, chain your default values, and call initialize to generate or load the file:
- Create the config with JsonConfig.create("your_mod_id", "1.0.0").
- Add entries using .put("Difficulty", 3) or .put("EnableFeatures", true).
- Call .initialize() to write or read the JSON file.
- Access values statically with methods like getInt, getBoolean, and getList.
The resulting file is human-readable and easy to edit by hand, which is a welcome trait for server administrators who want to tweak settings without launching the game.
How to Install Jsonate
If you are setting up Jsonate as a development dependency, the process depends on your build system. For Gradle-based projects, add the library to your dependencies block and refresh your build. For manual setups, simply drop the JsonConfig class into your source folder and adjust the package declaration. Many developers find that pairing their setup with the foxygame.net launcher streamlines the whole workflow, since its one-click install and automatic version matching keep Jsonate and other modding tools aligned with the exact Minecraft build they are targeting.
When you download Jsonate for Minecraft, double-check that the version you grab matches your target game release. Mixing versions can lead to subtle config parsing differences, especially if the JSON schema changed between updates.
Important Notes for Developers
- Cache config values in static fields to avoid repeated lookups during gameplay.
- Remember that files default to .minecraft/config/your_mod_id.json.
- Bump the version number whenever you change your .put logic so migrations trigger correctly.
Final Thoughts
Jsonate fills a small but genuinely annoying gap in Minecraft mod development. It removes the tedium of hand-rolled config parsing while staying lightweight enough to drop into almost any project. For developers who value clean code and predictable behavior, learning how to install and use this library is a worthwhile investment that pays off every time a player edits a setting.