Codec2Schema
A tool to convert codecs to JSON schemas.
About this Mod
Codec2Schema
Through the power of mixins, sheer will, and unchecked type casts, this mod transforms codecs into (mostly) usable JSON schemas.
What is a Codec?
Codecs are Mojang's way of easily serializing data to and from JSON. They define the structure of an object, meaning JSON schemas can be generated from them.
What is a JSON Schema?
A JSON schema is a file that describes how JSON files should be structured, and can be used by IDEs to provide autocomplete when creating or editing JSON files.
About This Mod
When installed, this mod exports JSON schemas for data and resource pack files to <YOUR GAME DIRECTORY>/codec2schema. You can use the API to export your own codecs as well!
The generated JSON schemas will have autocomplete for registries (items, blocks, etc), including modded content.
This mod is not perfect: there are many edge cases that aren't or can't be accounted for.
Example
The following is the generated JSON schema for regional compliancies warnings:
{
"$schema": "https://json-schema.org/draft-07/schema",
"$ref": "#/definitions/def",
"definitions": {
"def": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/def_1"
}
}
},
"def_1": {
"type": "object",
"properties": {
"delay": {
"type": "integer",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807,
"default": 0
},
"period": {
"type": "integer",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807
},
"title": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"period",
"title",
"message"
]
}
}
}
It's not perfect, but it's good enough.
Available Versions
How to Install Codec2Schema on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (26.2-rc-2).
Install Mod
Open the mod browser in the dashboard and search for "Codec2Schema". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
26.2-rc-2, 26.2-rc-1, 26.2-pre-6 (+37 more)
Server-side
~ OptionalRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Codec2Schema server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.2-rc-2). You can switch loaders with one click in the panel.
Is Codec2Schema compatible with fabric?
Codec2Schema officially supports fabric for Minecraft 26.2-rc-2, 26.2-rc-1, 26.2-pre-6. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Codec2Schema – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Codec2Schema consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Codec2Schema with just one click on your server.