MinecraftBlockRegistry

Block registry implementation using material name as blockId. Supports block state properties in the vanilla format as a payload in setBlock, for example [facing=north].

Contents of blocks holding items, like chests or campfires, are passed to the drops consumer in breakBlock. Shulker boxes keep their contents inside the dropped item.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val id: String
Link copied to clipboard
open override val knownIds: List<String>

Inherited properties

Link copied to clipboard
open val isEnabled: Boolean

Functions

Link copied to clipboard
open override fun breakBlock(block: Block, tool: ItemStack?, dropsConsumer: DropsConsumer<ItemStack>): Boolean
Link copied to clipboard
open override fun getBlockId(block: Block): String
Link copied to clipboard
open override fun getBlockIdFromItem(blockItem: ItemStack): String?
Link copied to clipboard
open override fun isBlockExists(blockId: String): Boolean
Link copied to clipboard
open override fun setBlock(block: Block, blockId: String, payload: Any?): Boolean

Inherited functions

Link copied to clipboard
open fun breakBlock(block: Block): Boolean
open fun breakBlock(block: Block, tool: ItemStack?): Boolean
Link copied to clipboard
open fun isSameBlock(block: Block, blockId: String): Boolean
Link copied to clipboard
open fun isSameBlockItem(blockItem: ItemStack, blockId: String): Boolean
Link copied to clipboard
open fun setBlock(block: Block, blockId: String): Boolean