public static interface BlockState.Builder extends ImmutableDataBuilder<BlockState,BlockState.Builder>
ImmutableDataBuilder for a BlockState. Just like the
ImmutableDataBuilder, the DataManipulators passed in to
create a BlockState are copied on creation.
Note that upon creation, the BlockType must be set for validation
of DataManipulators, 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, resetbuildBlockState.Builder blockType(BlockType blockType)
BlockType for the BlockState to build.
The BlockType is used for some pre-validation on addition of
DataManipulators through ImmutableDataBuilder.add(DataManipulator). It is
important to understand that not all manipulators are compatible with
all BlockTypes.
blockType - The block type