Properties

Link copied to clipboard
val id: Key

Functions

Link copied to clipboard
open fun behaviors(vararg behaviors: BlockBehaviorHolder)

Sets the behaviors of this block to behaviors.

Link copied to clipboard
fun config(name: String)

Configures the name of the config file in this addon's namespace.

Link copied to clipboard
fun entityBacked(stateSelector: BlockStateSelector = DEFAULT_BLOCK_STATE_SELECTOR, modelSelector: BlockModelSelector = DEFAULT_BLOCK_MODEL_SELECTOR)

Configures the model and hitbox type of this entity-based block model via stateSelector and modelSelector respectively.

Link copied to clipboard
fun entityItemBacked(stateSelector: BlockStateSelector = DEFAULT_BLOCK_STATE_SELECTOR, itemSelector: ItemDefinitionConfigurator = DEFAULT_CONFIGURE_BLOCK_MODEL_SELECTOR)

Configures the model and hitbox type of this entity-based block model via stateSelector and itemSelector respectively.

Link copied to clipboard
fun localizedName(localizedName: String)

Sets the localization key of the block.

Link copied to clipboard
fun modelLess(stateSelector: BlockStateSelector)

Configures this block to not use any custom models, but instead use the given stateSelector.

Link copied to clipboard
fun name(name: Component)

Sets the name of the block.

Link copied to clipboard
fun rawConfig(id: String)
fun rawConfig(id: Key)

Configures the id of this config file in the format namespace:name.

Link copied to clipboard
fun stateBacked(category: BackingStateCategory, vararg categories: BackingStateCategory, modelSelector: BlockModelSelector = DEFAULT_BLOCK_MODEL_SELECTOR)
fun stateBacked(priority: Int, category: BackingStateCategory, vararg categories: BackingStateCategory, modelSelector: BlockModelSelector = DEFAULT_BLOCK_MODEL_SELECTOR)

Configures the backing state types of this block model via the given (category, categories), then selects the corresponding block models via the given modelSelector.

Link copied to clipboard
fun stateProperties(vararg stateProperties: ScopedBlockStateProperty<*>)

Adds the stateProperties to the properties of this block.

Link copied to clipboard
fun style(vararg decorations: TextDecoration)
fun style(style: Style)
fun style(color: TextColor)
fun style(decoration: TextDecoration)
fun style(color: TextColor, vararg decorations: TextDecoration)

Sets the style of the block name.