Class endstone::Block¶
Represents a block. More...
#include <endstone/block/block.h>
Public Functions¶
| Type | Name | 
|---|---|
| virtual Dimension & | getDimension () const = 0 Gets the dimension which contains this Block .  | 
| virtual Location | getLocation () const = 0 Gets the Location of the block.  | 
| virtual std::unique_ptr< Block > | getRelative (int offset_x, int offset_y, int offset_z) = 0 Gets the block at the given offsets.  | 
| virtual std::unique_ptr< Block > | getRelative (BlockFace face) = 0 Gets the block at the given face.  | 
| virtual std::unique_ptr< Block > | getRelative (BlockFace face, int distance) = 0 Gets the block at the given distance of the given face.  | 
| virtual std::string | getType () const = 0 Get the type of the block.  | 
| virtual int | getX () const = 0 Gets the x-coordinate of this block.  | 
| virtual int | getY () const = 0 Gets the y-coordinate of this block.  | 
| virtual int | getZ () const = 0 Gets the z-coordinate of this block.  | 
| virtual | ~Block () = default | 
Detailed Description¶
This is a live object, and only one Block may exist for any given location in a dimension.
Public Functions Documentation¶
function getDimension¶
Gets the dimension which contains this Block .
Returns:
Dimension containing this block
function getLocation¶
Gets the Location of the block.
Returns:
Location of block
function getRelative [⅓]¶
Gets the block at the given offsets.
virtual std::unique_ptr< Block > endstone::Block::getRelative (
    int offset_x,
    int offset_y,
    int offset_z
) = 0
Parameters:
offset_xX-coordinate offsetoffset_yY-coordinate offsetoffset_zZ-coordinate offset
Returns:
Block at the given offsets
function getRelative [⅔]¶
Gets the block at the given face.
This method is equal to getRelative(face, 1)
Parameters:
faceFace of this block to return
Returns:
Block at the given face
function getRelative [3/3]¶
Gets the block at the given distance of the given face.
Parameters:
faceFace of this block to returndistanceDistance to get the block at
Returns:
Block at the given face
function getType¶
Get the type of the block.
This method returns the type of the block as a string, for example, minecraft:acacia_stairs.
Returns:
The type of the block.
function getX¶
Gets the x-coordinate of this block.
Returns:
x-coordinate
function getY¶
Gets the y-coordinate of this block.
Returns:
x-coordinate
function getZ¶
Gets the z-coordinate of this block.
Returns:
x-coordinate
function ~Block¶
The documentation for this class was generated from the following file include/endstone/block/block.h