Miscellaneous
endstone.ColorFormat
¶
All supported color and format codes.
Attributes:
endstone.GameMode
¶
endstone.Logger
¶
Logger class which can format and output varies levels of logs.
Classes:
| Name | Description |
|---|---|
Level |
Specifies the log level. |
Methods:
| Name | Description |
|---|---|
critical |
Log a message at the CRITICAL level. |
debug |
Log a message at the DEBUG level. |
error |
Log a message at the ERROR level. |
info |
Log a message at the INFO level. |
is_enabled_for |
Check if the Logger instance is enabled for the given log Level. |
set_level |
Set the logging level for this Logger instance. |
trace |
Log a message at the TRACE level. |
warning |
Log a message at the WARNING level. |
Attributes:
| Name | Type | Description |
|---|---|---|
CRITICAL |
|
|
DEBUG |
|
|
ERROR |
|
|
INFO |
|
|
TRACE |
|
|
WARNING |
|
|
name |
str
|
Get the name of this Logger instance. |
endstone.Registry
¶
Bases: Generic[_T]
Presents a registry
Methods:
| Name | Description |
|---|---|
get |
Get the object by its key. |
get_or_throw |
Get the object by its key or throw if missing. |
endstone.util
¶
Multi and single purpose classes.
Classes:
| Name | Description |
|---|---|
SocketAddress |
Represents an IP Socket Address (hostname + port number). |
Vector |
Represents a 3-dimensional vector. |
SocketAddress
¶
Vector
¶
Represents a 3-dimensional vector.
Methods:
| Name | Description |
|---|---|
angle |
Gets the angle between this vector and another in radians. |
cross_product |
Calculates the cross-product of this vector with another. |
distance |
The distance between this Vector and another |
distance_squared |
The squared distance between this Vector and another |
dot |
Calculates the dot product of this vector with another. |
is_in_aabb |
Returns whether this vector is in an axis-aligned bounding box. |
is_in_sphere |
Returns whether this vector is within a sphere. |
midpoint |
Gets a new midpoint vector between this vector and another. |
normalize |
Converts this vector to a unit vector (a vector with length of 1). |
normalize_zero |
Converts each component of value |
rotate_around_axis |
Rotates the vector around a given arbitrary axis in 3-dimensional space. |
rotate_around_x |
Rotates the vector around the x-axis. |
rotate_around_y |
Rotates the vector around the y-axis. |
rotate_around_z |
Rotates the vector around the z-axis. |
zero |
Zero this vector's components. |
Attributes:
| Name | Type | Description |
|---|---|---|
block_x |
int
|
Gets the floored value of the X component, indicating the block that this vector is contained with. |
block_y |
int
|
Gets the floored value of the Y component, indicating the block that this vector is contained with. |
block_z |
int
|
Gets the floored value of the Z component, indicating the block that this vector is contained with. |
is_normalized |
bool
|
Returns if a vector is normalized. |
is_zero |
bool
|
Check whether or not each component of this vector is equal to 0. |
length |
float
|
The magnitude of the Vector |
length_squared |
float
|
The squared magnitude of the Vector |
x |
float
|
The X component of the vector |
y |
float
|
The Y component of the vector |
z |
float
|
The Z component of the vector |
block_x
property
¶
block_x: int
Gets the floored value of the X component, indicating the block that this vector is contained with.
block_y
property
¶
block_y: int
Gets the floored value of the Y component, indicating the block that this vector is contained with.
block_z
property
¶
block_z: int
Gets the floored value of the Z component, indicating the block that this vector is contained with.
cross_product
¶
Calculates the cross-product of this vector with another.
distance_squared
¶
The squared distance between this Vector and another
is_in_aabb
¶
Returns whether this vector is in an axis-aligned bounding box.
is_in_sphere
¶
Returns whether this vector is within a sphere.
midpoint
¶
Gets a new midpoint vector between this vector and another.
normalize
¶
normalize() -> Vector
Converts this vector to a unit vector (a vector with length of 1).
rotate_around_axis
¶
Rotates the vector around a given arbitrary axis in 3-dimensional space.