Skip to Content
⚠ Under Construction
ReferenceC++ APIPosition

endstone::Position

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

Bases: endstone::Vector< float >

Functions:

NameDescription
Position
Position
getBlockXGets the floored value of the X component, indicating the block that this location is contained with.
getBlockYGets the floored value of the Y component, indicating the block that this location is contained with.
getBlockZGets the floored value of the Z component, indicating the block that this location is contained with.
getDimension
setDimension

Position

template <typename T, typename> Position(T x, T y, T z)
template <typename T, typename> Position(T x, T y, T z, Dimension &dimension)

getBlockX

int getBlockX() const

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

Returns:

block X

getBlockY

int getBlockY() const

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

Returns:

block Y

getBlockZ

int getBlockZ() const

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

Returns:

block Z

getDimension

Dimension *getDimension() const

Gets the dimension that this position resides in

Returns:

Dimension that contains this position, or nullptr if the dimension is not set.

setDimension

void setDimension(Dimension &dimension)

Sets the dimension that this position resides in

Parameters:

  • dimension New dimension that this position resides in
Last updated on