public interface BlockState extends ImmutableDataHolder<BlockState>
Location
with
a particular BlockType
and various ImmutableValue
s defining
the information for the "block". Note that normally, there may exist only
a single instance of a particular BlockState
as they are immutable,
a particular instance may be cached for various uses.Modifier and Type | Method and Description |
---|---|
BlockState |
cycleValue(Key<? extends BaseValue<? extends Cycleable<?>>> key)
Gets the associated
BlockState with the cycled
BaseValue . |
BlockType |
getType()
Get the base type of block.
|
BlockSnapshot |
snapshotFor(Location<World> location) |
getManipulators
toContainer
get, getContainers, getOrCreate, merge, merge, supports, transform, with, with, with, with, without
BlockType getType()
The type does not include block data such as the contents of inventories.
BlockState cycleValue(Key<? extends BaseValue<? extends Cycleable<?>>> key)
BlockState
with the cycled
BaseValue
. Note that only Cycleable
values can be
cycled. To change a particular Key
'ed Value
, usage
of the ImmutableValueStore.with(Key, Object)
is recommended.key
- The key to cycleBlockSnapshot snapshotFor(Location<World> location)