endstone::Dimension
Represents a dimension within a Level .
Types:
Name | Description |
---|---|
Type | Represents various dimension types. |
Functions:
Name | Description |
---|---|
dropItem | Drops an item at the specified Location . |
getBlockAt | Gets the Block at the given coordinates. |
getBlockAt | Gets the Block at the given Location . |
getHighestBlockAt | Gets the highest non-empty (impassable) block at the given coordinates. |
getHighestBlockAt | Gets the highest non-empty (impassable) block at the given Location . |
getHighestBlockYAt | Gets the highest non-empty (impassable) coordinate at the given coordinates. |
getLevel | Gets the level to which this dimension belongs. |
getLoadedChunks | Gets a list of all loaded Chunks. |
getName | Gets the name of this dimension. |
getType | Gets 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 blocky
Y-coordinate of the blockz
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:
location
Location of the block
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 blockz
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 blocksz
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