Skip to Content
⚠ Under Construction
ReferenceC++ APIDimension

endstone::Dimension

Represents a dimension within a Level .

Types:

NameDescription
TypeRepresents various dimension types.

Functions:

NameDescription
dropItemDrops an item at the specified Location .
getBlockAtGets the Block at the given coordinates.
getBlockAtGets the Block at the given Location .
getHighestBlockAtGets the highest non-empty (impassable) block at the given coordinates.
getHighestBlockAtGets the highest non-empty (impassable) block at the given Location .
getHighestBlockYAtGets the highest non-empty (impassable) coordinate at the given coordinates.
getLevelGets the level to which this dimension belongs.
getLoadedChunksGets a list of all loaded Chunks.
getNameGets the name of this dimension.
getTypeGets the type of this dimension.

Type

enum Type { Overworld = 0, Nether = 1, TheEnd = 2, Custom = 999 };

Represents various dimension types.

dropItem

Item &dropItem(Location location, ItemStack &item)

Drops an item at the specified Location .

Parameters:

Returns:

Item entity created as a result of this method

getBlockAt

std::unique_ptr<Block> getBlockAt(int x, int y, int z) const

Gets the Block at the given coordinates.

Parameters:

  • x X-coordinate of the block
  • y Y-coordinate of the block
  • z Z-coordinate of the block

Returns:

Block at the given coordinates

std::unique_ptr<Block> getBlockAt(Location location) const

Gets the Block at the given Location .

Parameters:

Returns:

Block at the given coordinates

getHighestBlockAt

std::unique_ptr<Block> getHighestBlockAt(int x, int z) const

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

Parameters:

  • x X-coordinate of the block
  • z Z-coordinate of the block

Returns:

Highest non-empty block

std::unique_ptr<Block> getHighestBlockAt(Location location) const

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

Parameters:

  • location Coordinates to get the highest block

Returns:

Highest non-empty block

getHighestBlockYAt

int getHighestBlockYAt(int x, int z) const

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

Parameters:

  • x X-coordinate of the blocks
  • z Z-coordinate of the blocks

Returns:

Y-coordinate of the highest non-empty block

getLevel

Level &getLevel() const

Gets the level to which this dimension belongs.

Returns:

Level containing this dimension.

getLoadedChunks

std::vector<std::unique_ptr<Chunk>> getLoadedChunks()

Gets a list of all loaded Chunks.

Returns:

All loaded chunks

getName

std::string getName() const

Gets the name of this dimension.

Returns:

Name of this dimension

getType

Type getType() const

Gets the type of this dimension.

Returns:

Type of this dimension

Last updated on