Skip to main content

Layer JSON Format

An Origin Layer is a collection of origins. Players choose one origin per enabled layer.

File Location​

Layer JSON files go in data/<namespace>/origins/layer/ within your data pack.

For example, data/origins/origins/layer/origin.json has the ID origins:origin (this is the default layer).

Fields​

FieldTypeDefaultDescription
nameText ComponentoptionalThe display name of the layer. Use translation key layer.<namespace>.<path>.name is more recommended
orderIntegerInteger.MAX_VALUESort order in the selection screen; lower numbers appear first
originsList of Identifier / #tag / Conditioned Origin objectsrequiredOrigins included in this layer. Supports direct IDs, tags, and conditioned origins
enabledBooleantrueWhether this layer is enabled
gui_titleGUI TitleoptionalCustom titles for the selection/view screens
allow_randomBooleanfalseWhether to show a "random pick" option
allow_random_unchoosableBooleanfalseWhether the random pick includes unchoosable origins
exclude_randomList of Identifier[]Origin IDs excluded from the random pick
default_originIdentifieroptional❌ Not yet implemented
auto_chooseBooleanfalseIf only one origin is available, whether to auto-choose it
hiddenBooleanfalseWhether to hide this layer from the "View Origin" screen
warning

Unlike Fabric version, which use missing_name and missing_description to display when no origin is assign for current layer, Origins (NeoForge) will simply hide the layer in view origin screen if it has no origin.

GUI Title​

FieldTypeDefaultDescription
choose_originText ComponentoptionalOverrides the title text shown when choosing an origin
view_originText ComponentoptionalOverrides the title text shown when viewing an origin

Conditioned Origins​

Within the origins List, you can mix string IDs with conditioned origin objects:

{
"condition": {
"type": "origins:and",
"conditions": [...]
},
"origins": [
"origins:special_origin"
]
}

Conditioned origin fields:

FieldTypeDescription
conditionEntity ConditionThe condition the player must fulfill
originsList of Identifier or #TagOrigins shown when the condition is met

Examples​

{
"order": 0,
"enabled": true,
"origins": [
"#origins:origin"
],
"allow_random": true,
"exclude_random": [
"origins:human"
]
}

A layer with a conditioned origin:

{
"order": 1,
"origins": [
"origins:human",
{
"condition": {
"type": "origins:origin",
"origin": "origins:human"
},
"origins": [
"origins:special_human_upgrade"
]
}
]
}
caution

Command can bypass the conditions and grant any origin in the layer, so conditioned origins are not a secure way to gate content. They are mainly for guiding players towards certain choices or creating a more dynamic selection experience.

note

Key differences from the old version:

  • replace field removed (the new registry system handles data overriding automatically)
  • missing_name and missing_description removed
  • loading_priority removed
  • gui_title sub-fields renamed to choose_origin / view_origin