RebarVirtualInventoryBlock

Saves and loads virtual inventories associated with the block.

When the block is broken, the contents of the virtual inventories will be dropped.

See InvUI docs for more information on virtual inventories.

See also

Functions

Link copied to clipboard

A map of inventory names to virtual inventories associated with this block

Link copied to clipboard
@MustBeInvokedByOverriders
open override 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 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.