Skip to content

API Reference

JohnSmith474 edited this page Sep 20, 2026 · 1 revision

The following JSON schemas define the data-driven components available within the Config Overhauled API.

Core Objects

ConfigDescription

Defines the precise hierarchical coordinates required to locate, bind, or dynamically construct a configuration property at runtime.

Property Type Required Default Description
mod_id String Yes - The target namespace or mod identifier.
category String Yes - The top-level classification category containing the target group.
group String Yes - The structural grouping containing the target property.
property String Yes - The exact registry or resource name of the target property.

Codec:

public static final Codec<ConfigDescription> CODEC = RecordCodecBuilder.create(instance -> instance.group(
        Codec.STRING.fieldOf("mod_id").forGetter(ConfigDescription::modId),
        Codec.STRING.fieldOf("category").forGetter(ConfigDescription::category),
        Codec.STRING.fieldOf("group").forGetter(ConfigDescription::group),
        Codec.STRING.fieldOf("property").forGetter(ConfigDescription::property)
).apply(instance, ConfigDescription::new));

Template:

{
  "mod_id": "example_mod",
  "category": "combat",
  "group": "weapons",
  "property": "damage_multiplier"
}

Clone this wiki locally