Protocol: Block
A live block at a fixed location in a dimension.
class Block(Protocol)
Related API: BlockVector3, Dimension
Properties
dimension
@property
def dimension(self) -> Dimension:
Dimension that owns this block.
Related API: Dimension
location
@property
def location(self) -> BlockVector3:
Integer location of this block.
Related API: BlockVector3
type_id
@property
def type_id(self) -> str:
Current namespaced block type identifier.
Methods
matches
def matches(self, type_id: str) -> bool:
Return whether the current block type matches an identifier.
set_type
def set_type(self, type_id: str) -> None:
Replace this block with the default state of a block type.
get_state
def get_state(self, name: str) -> Optional[str]:
Return a serialized block-state value, or None when absent.