GUI Modifiers
GUI Modifiers allow Texture Packs to modify containers based on a GUI Definition.
Json format
Root object
- target: A GUI Definition Target
- overrideLabels: (Optional) Disables rendering the Container Title, defaults to
false. - overrideBackground: (Optional) Disables rendering the Container Background Texture, defaults to
false. - bounds: (Optional) Determines if you clicked outside the container, uses the default container bounds if not specified.
- width: The width, should be 100 when using the default size.
- height: The height, should be 100 when using the default size.
- slots: (Optional) A map of slots to modify.
- <key>: The id of slot you want to modify
- elements: (Optional) A list of GUI elements.
- widgets: (Optional) A list of GUI widgets.
GUI Definition Target
Existing GUI Definition (catharsis:definition)
Target to an existing GUI Definition
Root definition gui modifier target object
- type:
catharsis:definition - definition: An existing GUI definition's identifier.
Slot Modifier
Modify a slot by moving it, disabling it, etc.
Root Slot Modifier map value
- hidden: (Optional) Hides the slot, defaults to
false. - highlightable: (Optional) Hides the hover highlight, defaults to
true. - position: (Optional) Moves the slot to a new x,y.
- x: The new x coordinate of the slot.
- y: The new y coordinate of the slot.
- clickable: (Optional) Removes the ability to click a slot, defaults to
true.
GUI Elements
Player (catharsis:player)
Render the Player itself on the screen.
Root GUI element object
- type:
catharsis:player - x: The x coordinate & alignment of the player. Can only be one of the entries below.
- The x coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the player, can be
START,CENTERorEND.
- The x coordinate based from the
- y: The y coordinate & alignment of the player. Can only be one of the entries below.
- The y coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the player, can be
START,CENTERorEND.
- The y coordinate based from the
- rotation: (Optional) The players rotation, will follow the mouse if undefined. Can only be one of the entries below.
- A list of 4 floats: first, second, and the third component of the imaginary part, and the real part.
- An AxisAngle definition.
- angle: The angle in radians.
- axis: A list of 4 floats: The value of x, y, and z.
Sprite (catharsis:sprite)
Render a sprite on the screen.
Root GUI element object
- type:
catharsis:sprite - sprite: The Identifier of the sprite to render.
- layer: (Optional) The layer to render the sprite on, defaults to
BACKGROUND. Can beBACKGROUND&FOREGROUND. - x: (Optional) The x coordinate & alignment of the sprite. Defaults to
0, START. Can only be one of the entries below.- The x coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the sprite, can be
START,CENTERorEND.
- The x coordinate based from the
- y: (Optional) The y coordinate & alignment of the sprite. Defaults to
0, START. Can only be one of the entries below.- The y coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the sprite, can be
START,CENTERorEND.
- The y coordinate based from the
- width: (Optional) The width of the sprite, defaults to the container width.
- height: (Optional) The height of the sprite, defaults to the container height.
Text (catharsis:text)
Render text on the screen.
Root GUI element object
- type:
catharsis:text - text: A component in JSON format.
- color: (Optional) The color to render the base string with, defaults to
-12566464. - x: The x coordinate & alignment of the text. Can only be one of the entries below.
- The x coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the text, can be
START,CENTERorEND.
- The x coordinate based from the
- y: The y coordinate & alignment of the text. Can only be one of the entries below.
- The y coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the text, can be
START,CENTERorEND.
- The y coordinate based from the
- alignment: (Optional) The text alignment based on the coordinates above, defaults to
0. 0 is left, 0.5 is center, 1 is right.
GUI Widget
Button (catharsis:button)
Render a button on the screen.
Root GUI widget object
- normal: The Identifier of the texture to render.
- hovered: The Identifier of the texture to render when the button is hovered.
- interaction: The interaction when clicked, view here.
- tooltip: The tooltip when hovered, view here.
- x: The x coordinate & alignment of the button. Can only be one of the entries below.
- The x coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the button, can be
START,CENTERorEND.
- The x coordinate based from the
- y: The y coordinate & alignment of the button. Can only be one of the entries below.
- The y coordinate based from the
START. - Coordinate & Alignment object.
- offset: The offset from the screen bounds (main container size).
- alignment: The alignment of the button, can be
START,CENTERorEND.
- The y coordinate based from the
- width: The width of the button.
- height: The height of the button.
GUI Widget Interaction
Link (catharsis:link)
Open a link in the default browser.
Root object
- type:
catharsis:link - url: A link to the Site.
Slot Clicking (catharsis:slot)
Click a slot on the screen.
Root object
- type:
catharsis:slot - slot: The slot to click.
Sending a command (catharsis:command)
Send a command in the chat.
WARNING
This is currently disabled due to security concerns, please join the Discord to provide feedback.
Root object
- type:
catharsis:command - command: The command to send.
GUI Widget Tooltip
Text (catharsis:text)
Renders a custom defined text.
Root object
- type:
catharsis:text - text: A list of or a single component in JSON format.
Slot Index (catharsis:slot)
Steals the tooltip from an existing slot.
Root object
- type:
catharsis:slot - slot: The slot to steal the tooltip from.
Widget Interaction (catharsis:interaction)
Steals the tooltip from the defined widget interaction. Only works if the interaction is catharsis:slot.
Root object
- type:
catharsis:interaction