Package com.sk89q.worldedit.world.block
Class BlockState
java.lang.Object
com.sk89q.worldedit.world.block.BlockState
- All Implemented Interfaces:
Pattern
,BlockStateHolder<BlockState>
- Direct Known Subclasses:
FuzzyBlockState
An immutable class that represents the state a block can be in.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsFuzzy
(BlockStateHolder<?> o) Checks if the type is the same, and if the matched states are the same.Get the block type.<V> V
Gets the value for the given state.Gets an immutable collection of the states.int
hashCode()
Gets aBaseBlock
from this BlockStateHolder.toBaseBlock
(CompoundTag compoundTag) Gets aBaseBlock
from this BlockStateHolder.Returns an immutableBlockState
from this BlockStateHolder.toString()
<V> BlockState
Returns a BlockState with the given state and value applied.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.world.block.BlockStateHolder
applyBlock, getAsString
-
Method Details
-
getBlockType
Description copied from interface:BlockStateHolder
Get the block type.- Specified by:
getBlockType
in interfaceBlockStateHolder<BlockState>
- Returns:
- The type
-
with
Description copied from interface:BlockStateHolder
Returns a BlockState with the given state and value applied.- Specified by:
with
in interfaceBlockStateHolder<BlockState>
- Parameters:
property
- The statevalue
- The value- Returns:
- The modified state, or same if could not be applied
-
getState
Description copied from interface:BlockStateHolder
Gets the value for the given state.- Specified by:
getState
in interfaceBlockStateHolder<BlockState>
- Parameters:
property
- The state- Returns:
- The value
-
getStates
Description copied from interface:BlockStateHolder
Gets an immutable collection of the states.- Specified by:
getStates
in interfaceBlockStateHolder<BlockState>
- Returns:
- The states
-
equalsFuzzy
Description copied from interface:BlockStateHolder
Checks if the type is the same, and if the matched states are the same.- Specified by:
equalsFuzzy
in interfaceBlockStateHolder<BlockState>
- Parameters:
o
- other block- Returns:
- true if equal
-
toImmutableState
Description copied from interface:BlockStateHolder
Returns an immutableBlockState
from this BlockStateHolder.- Specified by:
toImmutableState
in interfaceBlockStateHolder<BlockState>
- Returns:
- A BlockState
-
toBaseBlock
Description copied from interface:BlockStateHolder
Gets aBaseBlock
from this BlockStateHolder.- Specified by:
toBaseBlock
in interfaceBlockStateHolder<BlockState>
- Returns:
- The BaseBlock
-
toBaseBlock
Description copied from interface:BlockStateHolder
Gets aBaseBlock
from this BlockStateHolder.- Specified by:
toBaseBlock
in interfaceBlockStateHolder<BlockState>
- Parameters:
compoundTag
- The NBT Data to apply- Returns:
- The BaseBlock
-
toString
-
equals
-
hashCode
public int hashCode()
-