PylonGuiBlock

A block that has an associated InvUI GUI that can be opened by right-clicking the block. The GUI's inventories will be saved and loaded with the block.

See InvUI docs for information on how to make GUIs.

See also

Properties

Link copied to clipboard
@get:ApiStatus.NonExtendable
open val gui: AbstractGui

The GUI associated with this block.

Link copied to clipboard

The title of the GUI

Functions

Link copied to clipboard
abstract fun createGui(): Gui

Returns the block's GUI. Called when a block is created.

Link copied to clipboard
open fun getItems(): List<ItemStack>

Returns all the (non-null) items stored across all inventories in the block's GUI.

Link copied to clipboard
@MustBeInvokedByOverriders
open override fun onBreak(drops: MutableList<ItemStack>, context: BlockBreakContext)
Link copied to clipboard
@MustBeInvokedByOverriders
open override fun onInteract(event: PlayerInteractEvent)

This may be called for both hands, so make sure you check which hand is used.

Link copied to clipboard
open override fun onInventoryOpen(event: InventoryOpenEvent)
Link copied to clipboard
open override fun onItemMoveFrom(event: InventoryMoveItemEvent)
Link copied to clipboard
open override fun onItemMoveTo(event: InventoryMoveItemEvent)
Link copied to clipboard
open fun postBreak()