Package org.spongepowered.api.block
Interface BlockState.Builder
-
- All Superinterfaces:
AbstractBuilder<BlockState>
,Buildable.Builder<BlockState>
,Builder<BlockState,BlockState.Builder>
,CopyableBuilder<BlockState,BlockState.Builder>
,DataBuilder<BlockState>
,DataHolderBuilder<BlockState,BlockState.Builder>
,DataHolderBuilder.Immutable<BlockState,BlockState.Builder>
,ResettableBuilder<BlockState,BlockState.Builder>
,SerializableDataHolderBuilder<BlockState,BlockState.Builder>
,SerializableDataHolderBuilder.Immutable<BlockState,BlockState.Builder>
,State.Builder<BlockState,BlockState.Builder>
- Enclosing interface:
- BlockState
public static interface BlockState.Builder extends State.Builder<BlockState,BlockState.Builder>
AnDataHolderBuilder.Immutable
for aBlockState
. Just like theDataHolderBuilder.Immutable
, theValue
s passed in to create aBlockState
are copied on creation.Note that upon creation, the
BlockType
must be set for validation ofDataManipulator
s, otherwise exceptions may be thrown.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderBuilder
DataHolderBuilder.Immutable<H extends DataHolder.Immutable<H>,B extends DataHolderBuilder.Immutable<H,B>>, DataHolderBuilder.Mutable<H extends DataHolder.Mutable,B extends DataHolderBuilder.Mutable<H,B>>
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolderBuilder
SerializableDataHolderBuilder.Immutable<H extends SerializableDataHolder.Immutable<H>,B extends SerializableDataHolderBuilder.Immutable<H,B>>, SerializableDataHolderBuilder.Mutable<H extends SerializableDataHolder.Mutable,B extends SerializableDataHolderBuilder.Mutable<H,B>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BlockState.Builder
blockType(java.util.function.Supplier<? extends BlockType> blockType)
Sets theBlockType
for theBlockState
to build.BlockState.Builder
blockType(BlockType blockType)
Sets theBlockType
for theBlockState
to build.-
Methods inherited from interface net.kyori.adventure.util.Buildable.Builder
build
-
Methods inherited from interface org.spongepowered.api.data.persistence.DataBuilder
build
-
Methods inherited from interface org.spongepowered.api.data.DataHolderBuilder
add, add, add, add, add, addFrom, from, reset
-
Methods inherited from interface org.spongepowered.api.state.State.Builder
fromString
-
-
-
-
Method Detail
-
blockType
default BlockState.Builder blockType(java.util.function.Supplier<? extends BlockType> blockType)
Sets theBlockType
for theBlockState
to build.The
BlockType
is used for some pre-validation on addition ofDataManipulator
s throughDataHolderBuilder.add(DataManipulator)
. It is important to understand that not all manipulators are compatible with allBlockType
s.- Parameters:
blockType
- The block type- Returns:
- This builder, for chaining
-
blockType
BlockState.Builder blockType(BlockType blockType)
Sets theBlockType
for theBlockState
to build.The
BlockType
is used for some pre-validation on addition ofDataManipulator
s throughDataHolderBuilder.add(DataManipulator)
. It is important to understand that not all manipulators are compatible with allBlockType
s.- Parameters:
blockType
- The block type- Returns:
- This builder, for chaining
-
-