Package com.sk89q.worldedit.world.block
Interface BlockStateHolder<B extends BlockStateHolder<B>>
- All Superinterfaces:
Filter
,NbtValued
,Pattern
,TileEntityBlock
- All Known Implementing Classes:
BaseBlock
,BlanketBaseBlock
,BlockState
,FuzzyBlockState
,MobSpawnerBlock
,SignBlock
,SkullBlock
-
Method Summary
Modifier and TypeMethodDescriptiondefault BaseBlock
applyBlock
(BlockVector3 position) Return aBaseBlock
for the given position.void
applyTileEntity
(OutputExtent output, int x, int y, int z) boolean
equalsFuzzy
(BlockStateHolder<?> o) Checks if the type is the same, and if the matched states are the same.default String
Get the block type.int
Deprecated.int
Deprecated.int
Deprecated.int
Deprecated.char
Deprecated.<V> V
getState
(PropertyKey property) Gets the value for the given state.<V> V
Gets the value for the given state.Gets an immutable collection of the states.Gets aBaseBlock
from this BlockStateHolder.default BaseBlock
toBaseBlock
(ITileInput input, int x, int y, int z) default BaseBlock
toBaseBlock
(CompoundTag compoundTag) Deprecated.default BaseBlock
toBaseBlock
(LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> compoundTag) Gets aBaseBlock
from this BlockStateHolder.default BaseBlock
toBaseBlock
(com.sk89q.worldedit.util.nbt.CompoundBinaryTag compoundTag) Gets aBaseBlock
from this BlockStateHolder.Returns an immutableBlockState
from this BlockStateHolder.<V> B
with
(PropertyKey property, V value) Returns a BlockStateHolder with the given state and value applied.<V> B
Returns a BlockState with the given state and value applied.withPropertyId
(int propertyId) Deprecated.Methods inherited from interface com.fastasyncworldedit.core.queue.Filter
appliesChunk, appliesLayer, applyChunk, finishChunk, fork, join
Methods inherited from interface com.sk89q.worldedit.world.NbtValued
getNbt, getNbtData, getNbtReference, hasNbtData, setNbt, setNbtData, setNbtReference
Methods inherited from interface com.sk89q.worldedit.function.pattern.Pattern
apply, apply, applyBlock
Methods inherited from interface com.sk89q.worldedit.blocks.TileEntityBlock
getNbtId
-
Method Details
-
getBlockType
BlockType getBlockType()Get the block type.- Returns:
- The type
-
withPropertyId
Deprecated.Magic number (legacy uses). -
getInternalId
Deprecated.Get combined id (legacy uses). -
getOrdinal
Deprecated. -
getOrdinalChar
Deprecated. -
getMaterial
BlockMaterial getMaterial() -
getInternalBlockTypeId
Deprecated.Get type id (legacy uses). -
getInternalPropertiesId
Deprecated.Get the block data (legacy uses). -
with
Returns a BlockState with the given state and value applied.- Parameters:
property
- The statevalue
- The value- Returns:
- The modified state, or same if could not be applied
-
getState
Gets the value for the given state.- Parameters:
property
- The state- Returns:
- The value
-
with
Returns a BlockStateHolder with the given state and value applied.- Parameters:
property
- The property keyvalue
- The value- Returns:
- The modified state, or same if could not be applied
-
getState
Gets the value for the given state.- Parameters:
property
- The state- Returns:
- The value
-
getStates
Gets an immutable collection of the states.- Returns:
- The states
-
equalsFuzzy
Checks if the type is the same, and if the matched states are the same.- Parameters:
o
- other block- Returns:
- true if equal
-
toImmutableState
BlockState toImmutableState()Returns an immutableBlockState
from this BlockStateHolder.- Returns:
- A BlockState
-
toBaseBlock
BaseBlock toBaseBlock()Gets aBaseBlock
from this BlockStateHolder.- Returns:
- The BaseBlock
-
toBaseBlock
Deprecated.Gets aBaseBlock
from this BlockStateHolder.- Parameters:
compoundTag
- The NBT Data to apply- Returns:
- The BaseBlock
-
toBaseBlock
@NonAbstractForCompatibility(delegateName="toBaseBlock", delegateParams=CompoundTag.class) default BaseBlock toBaseBlock(LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> compoundTag) Gets aBaseBlock
from this BlockStateHolder.- Parameters:
compoundTag
- The NBT Data to apply- Returns:
- The BaseBlock
This must be overridden by new subclasses. See
NonAbstractForCompatibility
for details
-
toBaseBlock
Gets aBaseBlock
from this BlockStateHolder.- Parameters:
compoundTag
- The NBT Data to apply- Returns:
- The BaseBlock
-
applyBlock
Description copied from interface:Pattern
Return aBaseBlock
for the given position.- Specified by:
applyBlock
in interfacePattern
- Parameters:
position
- the position- Returns:
- a block
-
applyTileEntity
-
toBaseBlock
-
getAsString
-
toBaseBlock(LazyReference)
.