Block
endstone.block
¶
Classes:
Name | Description |
---|---|
Block |
Represents a block. |
BlockData |
Represents the data related to a live block |
BlockFace |
|
BlockState |
Represents a captured state of a block, which will not update automatically. |
Block
¶
Represents a block.
Methods:
Name | Description |
---|---|
capture_state |
Captures the current state of this block. The returned object will never be updated, and you are not guaranteed that (for example) a sign is still a sign after you capture its state. |
get_relative |
|
set_data |
Sets the complete data for this block |
set_type |
Sets the type of this block |
Attributes:
Name | Type | Description |
---|---|---|
data |
BlockData
|
Gets or sets the complete data for this block |
dimension |
Dimension
|
Gets the dimension which contains this Block |
location |
Location
|
Gets the Location of the block |
type |
str
|
Gets or sets the type of the block. |
x |
int
|
Gets the x-coordinate of this block |
y |
int
|
Gets the y-coordinate of this block |
z |
int
|
Gets the z-coordinate of this block |
capture_state
¶
capture_state() -> BlockState
Captures the current state of this block. The returned object will never be updated, and you are not guaranteed that (for example) a sign is still a sign after you capture its state.
get_relative
¶
Gets the block at the given offsets
Gets the block at the given distance of the given face
set_data
¶
Sets the complete data for this block
BlockData
¶
BlockFace
¶
BlockFace(value: int)
BlockState
¶
Represents a captured state of a block, which will not update automatically.
Methods:
Name | Description |
---|---|
update |
Attempts to update the block represented by this state. |
Attributes:
Name | Type | Description |
---|---|---|
block |
Block
|
Gets the block represented by this block state. |
data |
BlockData
|
Gets or sets the data for this block state. |
dimension |
Dimension
|
Gets the dimension which contains the block represented by this block state. |
location |
Location
|
Gets the location of this block state. |
type |
str
|
Gets or sets the type of this block state. |
x |
int
|
Gets the x-coordinate of this block state. |
y |
int
|
Gets the y-coordinate of this block state. |
z |
int
|
Gets the z-coordinate of this block state. |