register

fun register(key: NamespacedKey, material: Material, blockClass: Class<out RebarBlock>)(source)

Registers a new block type with Rebar.

Parameters

key

A unique key that identifies this type of block

material

The material to use as the block. This must match the material of the item(s) that place the block.

blockClass

The class extending RebarBlock that represents a block of this type in the world.


inline fun <T : RebarBlock> register(key: NamespacedKey, material: Material)(source)