RebarInventoryBlock

A simple interface that opens a GUI when the block is right clicked

The title of the window opened is by default the block's name. Override guiTitle to change this.

See InvUI docs for information on how to make GUIs.

See also

Types

Link copied to clipboard

Properties

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 onBreak(drops: MutableList<ItemStack>, context: BlockBreakContext)

Called as the block is being broken. At this point, the block break cannot be cancelled, but the physical block has not yet been broken or removed from io.github.pylonmc.rebar.block.BlockStorage.

Link copied to clipboard
open override fun onInventoryOpen(event: InventoryOpenEvent, priority: EventPriority)
Link copied to clipboard
open override fun onItemMoveFrom(event: InventoryMoveItemEvent, priority: EventPriority)
Link copied to clipboard
open override fun onItemMoveTo(event: InventoryMoveItemEvent, priority: EventPriority)
Link copied to clipboard
open fun postBreak(context: BlockBreakContext)

Called after the block has been broken. At this point, the block has been physically removed, block drops have been dropped, and the block has been removed from io.github.pylonmc.rebar.block.BlockStorage.

Link copied to clipboard
open fun preBreak(context: BlockBreakContext): Boolean

Called before the block is broken. Note this is not called for Deletions as those are not cancellable.