Skip to content

Hotbar Slot Config (Data Type)

Zac edited this page Nov 11, 2026 · 1 revision

Data Type


An Array named variants containing any amount of the following Object.

Variants are worked through from top to bottom, so whichever condition matches first will appear. A stack being null or unspecified means it will display the actual slot contents, while a stack being empty (minecraft:air) will show as empty. A variant with no condition will always match.

Tip

Read the examples.

Fields

Field Type Default Description
stack Item Stack null This variant's stack.
condition Entity Condition null This variant's condition.

Examples

"hotbar_1": {
  "variants": [
    {
      "stack": {
        "item": "originscontent:model",
        "tag": "{BarResource:'example:resource',BarColor:'#ff0077'}"
      },
      "condition": {
        "type": "origins:resource",
        "resource": "example:selected",
        "comparison": "==",
        "compare_to": "1"
      }
    },
    {
      "stack": {
        "item": "originscontent:model",
        "tag": "{BarResource:'example:resource2',BarColor:'#00ff77'}"
      },
      "condition": {
        "type": "origins:resource",
        "resource": "example:selected",
        "comparison": "==",
        "compare_to": "2"
      }
    },
    {
      "stack": {
        "item": "minecraft:air"
      }
    }
  ]
}

This example will show a model item with a red cooldown bar of example:resource in the first slot if the example:selected resource is 1, else if example:selected is 2, it will show a model item with a green cooldown bar of example:resource2, and if selected is neither, it will show an empty slot.

Clone this wiki locally