Codec2Schema

A tool to convert codecs to JSON schemas.

by
667 Downloads
fabriccursedlibraryutility
Rent Server with this Mod

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

0.3.6+1.21.11release
MC 1.21.11fabric
June 13, 2026
0.3.6+26.1.2release
MC 26.1, 26.1.1, 26w14a, 26.1.2fabric
June 11, 2026
0.3.5+26.1.2release
MC 26.1, 26.1.1, 26w14a, 26.1.2fabric
May 20, 2026
0.3.4+26.1.2release
MC 26.1, 26.1.1, 26w14a, 26.1.2fabric
April 12, 2026
0.3.3+26.1.1release
MC 26.1, 26.1.1-rc-1, 26.1.1, 26w14a, 26.1.2-rc-1, 26.1.2fabric
April 2, 2026

How to Install Codec2Schema on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.2-rc-2).

3

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

fabric

Minecraft Versions

26.2-rc-2, 26.2-rc-1, 26.2-pre-6 (+37 more)

Server-side

~ Optional

Recommended 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.

Rent Modded Server

Install Codec2Schema with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Optional

Supported Versions

26.2-rc-226.2-rc-126.2-pre-626.2-pre-526.2-pre-426.2-pre-326.2-pre-226.2-pre-126.2-snapshot-826.2-snapshot-7+30 more