public static interface BlockState.Builder extends ImmutableDataBuilder<BlockState,BlockState.Builder>
ImmutableDataBuilder
for a BlockState
. Just like the
ImmutableDataBuilder
, the DataManipulator
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.
Modifier and Type | Method and Description |
---|---|
BlockState.Builder |
blockType(BlockType blockType)
Sets the
BlockType for the BlockState to build. |
add, add, add, build, from, reset
build
BlockState.Builder blockType(BlockType blockType)
BlockType
for the BlockState
to build.
The BlockType
is used for some pre-validation on addition of
DataManipulator
s through ImmutableDataBuilder.add(DataManipulator)
. It is
important to understand that not all manipulators are compatible with
all BlockType
s.
blockType
- The block type