endstone.level

Classes

NameDescription
Chunk

Represents a chunk of blocks.

Dimension

Represents a dimension within a Level.

Level
Location

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

classChunk

Chunk()

Represents a chunk of blocks.

Attributes

NameTypeDescription
dimensionDimension

Gets the dimension containing this chunk

levelLevel

Gets the level containing this chunk

xint

Gets the X-coordinate of this chunk

zint

Gets the Z-coordinate of this chunk

attrdimensionproperty

dimension: Dimension

Gets the dimension containing this chunk

attrlevelproperty

level: Level

Gets the level containing this chunk

attrxproperty

x: int

Gets the X-coordinate of this chunk

attrzproperty

z: int

Gets the Z-coordinate of this chunk

classDimension

Dimension()

Represents a dimension within a Level.

Classes

NameDescription
Type

Represents various dimension types.

Methods

NameDescription
drop_item

Drops an item at the specified Location

get_highest_block_y_at

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

spawn_actor

Creates an actor at the given Location

Attributes

NameTypeDescription
CUSTOM
NETHER
OVERWORLD
THE_END
actorslist[Actor]

Get a list of all actors in this dimension

levelLevel

Gets the level to which this dimension belongs

loaded_chunkslist[Chunk]

Gets a list of all loaded Chunks

namestr

Gets the name of this dimension

typeType

Gets the type of this dimension

attrCUSTOM

CUSTOM

attrNETHER

NETHER

attrOVERWORLD

OVERWORLD

attrTHE_END

THE_END

attractorsproperty

actors: list[Actor]

Get a list of all actors in this dimension

attrlevelproperty

level: Level

Gets the level to which this dimension belongs

attrloaded_chunksproperty

loaded_chunks: list[Chunk]

Gets a list of all loaded Chunks

attrnameproperty

name: str

Gets the name of this dimension

attrtypeproperty

type: Type

Gets the type of this dimension

classType

Bases: Enum

Type()

Represents various dimension types.

Attributes

NameTypeDescription
CUSTOM
NETHER
OVERWORLD
THE_END

attrCUSTOM

CUSTOM = 999

attrNETHER

NETHER = 1

attrOVERWORLD

OVERWORLD = 0

attrTHE_END

THE_END = 2

methdrop_item

drop_item(location: Location, item: ItemStack) -> Item

Drops an item at the specified Location

methget_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.

methspawn_actor

spawn_actor(location: Location, type: str) -> Actor

Creates an actor at the given Location

classLevel

Level()

Methods

NameDescription
get_dimension

Gets 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.

namestr

Gets the unique name of this level

seedint

Gets the Seed for this level.

timeint

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

attractorsproperty

actors: list[Actor]

Get a list of all actors in this level

attrdimensionsproperty

dimensions: list[Dimension]

Gets a list of all dimensions within this level.

attrnameproperty

name: str

Gets the unique name of this level

attrseedproperty

seed: int

Gets the Seed for this level.

attrtimeproperty

time: int

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

methget_dimension

get_dimension(name: str) -> Dimension

Gets the dimension with the given name.

classLocation

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

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

Methods

NameDescription
distance

The distance between this Location and another

distance_squared

The squared distance between this Location and another

normalize_pitch

Normalizes the given pitch angle to a value between +/-90 degrees.

normalize_yaw

Normalizes the given yaw angle to a value between +/-180 degrees.

zero

Zero this vector's components.

Attributes

NameTypeDescription
blockBlock

Gets the block at the represented location

block_xint

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

block_yint

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

block_zint

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

dimensionDimension

The Dimension that contains this position

directionVector

Gets or sets a vector of yaw and pitch that points in the direction of the vector

lengthfloat

The magnitude of the Location

length_squaredfloat

The squared magnitude of the Location

pitchfloat

The pitch of this location, measured in degrees.

xfloat

The x-coordinate of this location

yfloat

The y-coordinate of this location

yawfloat

The yaw of this location, measured in degrees.

zfloat

The z-coordinate of this location

attrblockproperty

block: Block

Gets the block at the represented location

attrblock_xproperty

block_x: int

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

attrblock_yproperty

block_y: int

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

attrblock_zproperty

block_z: int

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

attrdimensionproperty

dimension: Dimension

The Dimension that contains this position

attrdirectionproperty

direction: Vector

Gets or sets a vector of yaw and pitch that points in the direction of the vector

attrlengthproperty

length: float

The magnitude of the Location

attrlength_squaredproperty

length_squared: float

The squared magnitude of the Location

attrpitchproperty

pitch: float

The pitch of this location, measured in degrees.

attrxproperty

The x-coordinate of this location

attryproperty

The y-coordinate of this location

attryawproperty

yaw: float

The yaw of this location, measured in degrees.

attrzproperty

The z-coordinate of this location

methdistance

distance(other: Location) -> float

The distance between this Location and another

methdistance_squared

distance_squared(other: Location) -> float

The squared distance between this Location and another

methnormalize_pitchstaticmethod

normalize_pitch(pitch: float) -> float

Normalizes the given pitch angle to a value between +/-90 degrees.

methnormalize_yawstaticmethod

normalize_yaw(yaw: float) -> float

Normalizes the given yaw angle to a value between +/-180 degrees.

methzero

zero() -> Location

Zero this vector's components.

On this page