Skip to content

Gui Definitions

In Catharsis we support a way to define definitions and ids for specific guis and their slots. This allows you to create dynamic guis that can be referenced in other parts of Catharsis or in Item Models.

You can define a gui definition in assets/<namespace>/catharsis/guis/<id>.json.

Json format

Root object
  • priority: The priority of the gui definition. Use it for generic guis that will apply to all.
  • target: The gui definition target.
  • layout: The slots to define in this gui.
    • Slot Definition Object
      • id: The id of the slot to define, this will be used to reference in item models.
      • target: The slot condition to match against.

Gui Definition Target

A Gui Definition Target object
  • type: One of the types below.
  • Additional fields depending on the value of type, see the respective target type documentation for more details.

Available Gui Definition Target Types

Title (catharsis:title)

Match against a specific gui title.

Root title gui definition target object
  • type: catharsis:title
  • title: A regex pattern to match the gui title against.

Islands (catharsis:islands)

Match against the Player's current island.

Root islands gui definition target object - **type**: `catharsis:islands` - **islands**: A list of island ids to match against, names are equal to the value of `mode` in `/locraw` or the enum name in [SkyBlockIsland](https://github.com/SkyblockAPI/SkyblockAPI/blob/4.0/src/main/kotlin/tech/thatgravyboat/skyblockapi/api/location/SkyBlockIsland.kt).

Slot (catharsis:slot)

Match against a gui with a specific slot condition.

Root slot gui definition target object
  • type: catharsis:slot
  • index: The slot index to match against.
  • condition: The slot condition to match against.

Match against a specific menu type. Menu Type names are located here, including inventory for the player's inventory and generic for all chest container sizes.

Root menu gui definition target object
  • type: catharsis:type
  • menu: The menu type to match against.

External Mod Config (catharsis:external_mod_config)

Match against external mod config values. This allows you to ensure compatability with mods that override some guis.

Root external_mod_config gui definition target object
  • type: catharsis:external_mod_config
  • modId: (Optional) The modid of the mod. While its optional, its very recommended.
  • file: The path to the specific config file, starting from the .minecraft/config folder, needs to end in .json, .jsonc or .json5.
  • path: The JsonPath to the value to check, supports basic dot notation.
  • value: The value to check against, supports every json value.

All/And (catharsis:all)

Check if a list of conditions are true, useful for chaining conditions.

Root all gui definition target object
  • type: catharsis:all
  • conditions: a list of conditions to check through.

Any/Or (catharsis:any)

Check if any in list of conditions are true, useful for chaining conditions.

Root any gui definition target object
  • type: catharsis:any
  • conditions: a list of conditions to check through.

Not (catharsis:not)

Check if a condition is false, useful for chaining conditions.

Root any gui definition target object
  • type: catharsis:not
  • condition: a condition to check against.