BlockType

class BlockType(mcBlock: MCBlock)

An immutable wrapper around Minecraft's Block object. Note that this references a block "type", and not an actual block in the world. If a reference to a particular block is needed, use Block

Constructors

Link copied to clipboard
fun BlockType(block: BlockType)
Link copied to clipboard
fun BlockType(blockName: String)
Link copied to clipboard
fun BlockType(blockID: Int)
Link copied to clipboard
fun BlockType(item: Item)
Link copied to clipboard
fun BlockType(mcBlock: MCBlock)

Functions

Link copied to clipboard
fun canProvidePower(): Boolean
Link copied to clipboard
fun getDefaultMetadata(): Int
Link copied to clipboard
fun getDefaultState(): IBlockState
Link copied to clipboard
fun getHarvestLevel(): Int
Link copied to clipboard
fun getID(): Int
Link copied to clipboard
fun getLightValue(): Int
Link copied to clipboard
fun getName(): String

Gets the block's localized name. Example: Wooden Planks

Link copied to clipboard
fun getRegistryName(): String

Gets the block's registry name. Example: minecraft:planks

Link copied to clipboard
fun getUnlocalizedName(): String

Gets the block's unlocalized name. Example: tile.wood

Link copied to clipboard
fun isTranslucent(): Boolean
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun withBlockPos(blockPos: BlockPos): Block

Returns a Block based on this block and the provided BlockPos

Properties

Link copied to clipboard
val mcBlock: MCBlock

Sources

Link copied to clipboard