Skip to content

Class endstone::Dimension

ClassList > endstone > Dimension

Represents a dimension within a Level .

  • #include <endstone/level/dimension.h>

Public Types

Type Name
enum Type
Represents various dimension types.

Public Functions

Type Name
virtual std::shared_ptr< Block > getBlockAt (int x, int y, int z) const = 0
Gets the Block at the given coordinates.
virtual std::shared_ptr< Block > getBlockAt (Location location) const = 0
Gets the Block at the givenLocation .
virtual std::shared_ptr< Block > getHighestBlockAt (int x, int z) const = 0
Gets the highest non-empty (impassable) block at the given coordinates.
virtual std::shared_ptr< Block > getHighestBlockAt (Location location) const = 0
Gets the highest non-empty (impassable) block at the given coordinates.
virtual int getHighestBlockYAt (int x, int z) const = 0
Gets the highest non-empty (impassable) coordinate at the given coordinates.
virtual Level & getLevel () const = 0
Gets the level to which this dimension belongs.
virtual std::vector< std::unique_ptr< Chunk > > getLoadedChunks () = 0
Gets a list of all loaded Chunks.
virtual std::string getName () const = 0
Gets the name of this dimension.
virtual Type getType () const = 0
Gets the type of this dimension.
virtual ~Dimension () = default

Public Types Documentation

enum Type

Represents various dimension types.

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


Public Functions Documentation

function getBlockAt [½]

Gets the Block at the given coordinates.

virtual std::shared_ptr< Block > endstone::Dimension::getBlockAt (
    int x,
    int y,
    int z
) const = 0

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


function getBlockAt [2/2]

Gets the Block at the givenLocation .

virtual std::shared_ptr< Block > endstone::Dimension::getBlockAt (
    Location location
) const = 0

Parameters:

Returns:

Block at the given coordinates


function getHighestBlockAt [½]

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

virtual std::shared_ptr< Block > endstone::Dimension::getHighestBlockAt (
    int x,
    int z
) const = 0

Parameters:

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

Returns:

Highest non-empty block


function getHighestBlockAt [2/2]

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

virtual std::shared_ptr< Block > endstone::Dimension::getHighestBlockAt (
    Location location
) const = 0

Parameters:

  • location Coordinates to get the highest block

Returns:

Highest non-empty block


function getHighestBlockYAt

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

virtual int endstone::Dimension::getHighestBlockYAt (
    int x,
    int z
) const = 0

Parameters:

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

Returns:

Y-coordinate of the highest non-empty block


function getLevel

Gets the level to which this dimension belongs.

virtual Level & endstone::Dimension::getLevel () const = 0

Returns:

Level containing this dimension.


function getLoadedChunks

Gets a list of all loaded Chunks.

virtual std::vector< std::unique_ptr< Chunk > > endstone::Dimension::getLoadedChunks () = 0

Returns:

All loaded chunks


function getName

Gets the name of this dimension.

virtual std::string endstone::Dimension::getName () const = 0

Returns:

Name of this dimension


function getType

Gets the type of this dimension.

virtual Type endstone::Dimension::getType () const = 0

Returns:

Type of this dimension


function ~Dimension

virtual endstone::Dimension::~Dimension () = default


The documentation for this class was generated from the following file include/endstone/level/dimension.h