NovaBlockState

open class NovaBlockState

A block state of a custom Nova block. Every block state is a unique configuration of a block's properties.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The BlockStateProperties of this block state.

Link copied to clipboard

The property-value configuration of this block state.

Functions

Link copied to clipboard

Gets the NovaBlockState with property cycled to the next value.

Link copied to clipboard
operator fun <T : Any> get(property: BlockStateProperty<T>): T?

Gets the value of the given property or null if the property is not set.

Link copied to clipboard
fun <T : Any> getOrThrow(property: BlockStateProperty<T>): T

Gets the value of the given property or throws an IllegalStateException if the property is not set.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun with(propertyValues: Map<BlockStateProperty<*>, Any>): NovaBlockState

Gets the NovaBlockState for this block with the given propertyValues or throws an exception for invalid values.

fun <T : Any> with(property: BlockStateProperty<T>, value: T): NovaBlockState

Gets the NovaBlockState for this block where property is value or throws an exception for invalid values.