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.

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.