Package org.spongepowered.api.block
Interface BlockState.Builder
- All Superinterfaces:
AbstractBuilder<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
An
DataHolderBuilder.Immutable
for a BlockState
. Just like the
DataHolderBuilder.Immutable
, the Value
s passed in to
create a BlockState
are copied on creation.
Note that upon creation, the BlockType
must be set for validation
of DataManipulator
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
Modifier and TypeMethodDescriptiondefault BlockState.Builder
Sets theBlockType
for theBlockState
to build.Sets theBlockType
for theBlockState
to build.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
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 Details
-
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
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
-