public interface BlockStateHolder<B extends BlockStateHolder<B>> extends Pattern
Modifier and Type | Method and Description |
---|---|
default BaseBlock |
applyBlock(BlockVector3 position)
Return a
BaseBlock for the given position. |
boolean |
equalsFuzzy(BlockStateHolder<?> o)
Checks if the type is the same, and if the matched states are the same.
|
default java.lang.String |
getAsString() |
BlockType |
getBlockType()
Get the block type.
|
<V> V |
getState(Property<V> property)
Gets the value for the given state.
|
java.util.Map<Property<?>,java.lang.Object> |
getStates()
Gets an immutable collection of the states.
|
BaseBlock |
toBaseBlock()
Gets a
BaseBlock from this BlockStateHolder. |
BaseBlock |
toBaseBlock(CompoundTag compoundTag)
Gets a
BaseBlock from this BlockStateHolder. |
BlockState |
toImmutableState()
Returns an immutable
BlockState from this BlockStateHolder. |
<V> B |
with(Property<V> property,
V value)
Returns a BlockState with the given state and value applied.
|
BlockType getBlockType()
<V> B with(Property<V> property, V value)
property
- The statevalue
- The value<V> V getState(Property<V> property)
property
- The statejava.util.Map<Property<?>,java.lang.Object> getStates()
boolean equalsFuzzy(BlockStateHolder<?> o)
o
- other blockBlockState toImmutableState()
BlockState
from this BlockStateHolder.BaseBlock toBaseBlock()
BaseBlock
from this BlockStateHolder.BaseBlock toBaseBlock(CompoundTag compoundTag)
BaseBlock
from this BlockStateHolder.compoundTag
- The NBT Data to applydefault BaseBlock applyBlock(BlockVector3 position)
Pattern
BaseBlock
for the given position.applyBlock
in interface Pattern
position
- the positiondefault java.lang.String getAsString()