GUI

GUI is a displayable panel with elements such as buttons, labels, slots, ...

NeoForge 26.1.2NeoForge 1.21.1

Step-by-step guide: how to make gui →

Fields you fill in

Button display condition

If the condition is specified, the button is only visible (displayed/shown) in case the condition passes.

Checkbox procedure value

This procedure determines whether to initially check this box or not when the GUI is opened.

Entity model

Uses the return value of the selected procedure to determine the model that will be displayed.

The return value must be an entity.

Entity model display condition

If condition is specified, this entity model will only be displayable in case the condition passes.

Entity model follow mouse

If checked, the displayed entity model will rotate towards the mouse's position.

Mouse rotation will be added to the existing fixed rotation value.

Entity model rotation

Entity yaw rotation parameter defines initial rotation of the rendered entity model in degrees.

Larger values may cause some rendering issues due to the render engine limitations.

Entity model scale

Determines the size of the displayed entity model.

When this GUI is closed

Triggers a procedure when this GUI is closed.

GUI open tick

Triggers a procedure every tick while this GUI is open.

When this GUI is opened

Triggers a procedure when this GUI is opened.

Image display condition

If condition is specified, this image can only be displayed in case the condition passes.

Label display condition

If condition is specified, this label can only be displayed in case the condition passes.

Label text

This parameter defines the text displayed by the label when the GUI is open.

You can use string return type procedure for more complex texts.

On button clicked

Triggers a procedure when this button is clicked.

Slot pickup condition

If the condition returns true, players will not be able to take the items inside this slot.

However, they will still be able to place items without any restriction.

Slot placement condition

If the condition returns true, players will not be able to place the items inside this slot.

However, they will still be able to take items without any restriction.

Note: This condition overrides the "Limit stack input" parameter.

Sprite count

This parameter specifies the number of sprites in the selected texture.

Sprite display condition

If the condition is specified, this sprite can only be displayed in case it passes.

Sprite index

Specifies the index of the sprite to be displayed.

NOTE: Sprites index starts with 0 and goes to *Number of sprites* - 1

Tooltip display condition

If condition is specified, this tooltip can only be displayed in case the condition passes.

Tooltip text

The text that will be displayed in the tooltip for a player that hovers area covered by this component.

When slider moves

Triggers a procedure when the slider is selected and the cursor moves.

When slot changed

Triggers a procedure when an item is put into/taken from this slot.

When slot item taken

Triggers a procedure when an item is put into/taken from this slot.

When transferred from slot

Triggers a procedure when items in this slot are transferred from it.