Skip to Content
⚠ Under Construction
ReferencePython APIendstone.level

endstone.level

Classes:

NameDescription
ChunkRepresents a chunk of blocks.
DimensionRepresents a dimension within a Level.
Level
LocationRepresents a 3-dimensional location in a dimension within a level.
PositionRepresents a 3-dimensional position in a dimension within a level.

Chunk

Represents a chunk of blocks.

Attributes:

NameTypeDescription
dimensionDimensionGets the dimension containing this chunk
levelLevelGets the level containing this chunk
xintGets the X-coordinate of this chunk
zintGets the Z-coordinate of this chunk

dimension

dimension: Dimension

Gets the dimension containing this chunk

level

level: Level

Gets the level containing this chunk

x

x: int

Gets the X-coordinate of this chunk

z

z: int

Gets the Z-coordinate of this chunk

Dimension

Represents a dimension within a Level.

Classes:

NameDescription
TypeRepresents various dimension types.

Methods:

NameDescription
get_block_atGets the Block at the given Location
Gets the Block at the given coordinates
get_highest_block_atGets the highest non-empty (impassable) block at the given Location.
Gets the highest non-empty (impassable) block at the given coordinates.
get_highest_block_y_atGets the highest non-empty (impassable) coordinate at the given coordinates.

Attributes:

NameTypeDescription
CUSTOMType
NETHERType
OVERWORLDType
THE_ENDType
levelLevelGets the level to which this dimension belongs
loaded_chunkslist[Chunk]Gets a list of all loaded Chunks
namestrGets the name of this dimension
typeTypeGets the type of this dimension

CUSTOM

CUSTOM: Dimension.Type

NETHER

NETHER: Dimension.Type

OVERWORLD

OVERWORLD: Dimension.Type

THE_END

THE_END: Dimension.Type

level

level: Level

Gets the level to which this dimension belongs

loaded_chunks

loaded_chunks: list[Chunk]

Gets a list of all loaded Chunks

name

name: str

Gets the name of this dimension

type

type: Dimension.Type

Gets the type of this dimension

Type

Type(value:int)

Represents various dimension types.

Attributes:

CUSTOM
CUSTOM: Dimension.Type
NETHER
NETHER: Dimension.Type
OVERWORLD
OVERWORLD: Dimension.Type
THE_END
THE_END: Dimension.Type
name
name: str
value
value: int

get_block_at

get_block_at(location:Location) -> Block

Gets the Block at the given Location

get_block_at(x:int, y:int, z:int) -> Block

Gets the Block at the given coordinates

get_highest_block_at

get_highest_block_at(location:Location) -> Block

Gets the highest non-empty (impassable) block at the given Location.

get_highest_block_at(x:int, z:int) -> Block

Gets the highest non-empty (impassable) block at the given coordinates.

get_highest_block_y_at

get_highest_block_y_at(x:int, z:int) -> int

Gets the highest non-empty (impassable) coordinate at the given coordinates.

Level

Methods:

NameDescription
get_dimensionGets the dimension with the given name.

Attributes:

NameTypeDescription
actorslist[Actor]Get a list of all actors in this level
dimensionslist[Dimension]Gets a list of all dimensions within this level.
namestrGets the unique name of this level
timeintGets and sets the relative in-game time on the server

actors

actors: list[Actor]

Get a list of all actors in this level

dimensions

dimensions: list[Dimension]

Gets a list of all dimensions within this level.

name

name: str

Gets the unique name of this level

time

time: int

Gets and sets the relative in-game time on the server

get_dimension

get_dimension(name:str) -> Dimension

Gets the dimension with the given name.

Location

Location( dimension: Dimension, x: float, y: float, z: float, pitch: float = 0.0, yaw: float = 0.0, )

Bases: Position

Represents a 3-dimensional location in a dimension within a level.

Attributes:

NameTypeDescription
pitchfloatThe pitch of this location, measured in degrees.
yawfloatThe yaw of this location, measured in degrees.

pitch

pitch: float

The pitch of this location, measured in degrees.

yaw

yaw: float

The yaw of this location, measured in degrees.

Position

Position(dimension:Dimension, x:float, y:float, z:float)

Bases: Vector

Represents a 3-dimensional position in a dimension within a level.

Attributes:

NameTypeDescription
block_xintGets the floored value of the X component, indicating the block that this location is contained with.
block_yintGets the floored value of the Y component, indicating the block that this location is contained with.
block_zintGets the floored value of the Z component, indicating the block that this location is contained with.
dimensionDimensionThe Dimension that contains this position

block_x

block_x: int

Gets the floored value of the X component, indicating the block that this location is contained with.

block_y

block_y: int

Gets the floored value of the Y component, indicating the block that this location is contained with.

block_z

block_z: int

Gets the floored value of the Z component, indicating the block that this location is contained with.

dimension

dimension: Dimension

The Dimension that contains this position

Last updated on