50 if (a_BlockPos.
y <= 0)
54 auto blockTypeBelow = a_ChunkInterface.
GetBlock(a_BlockPos.
addedY(-1));
void SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Sets the block at the specified coords to the specified value.
unsigned char BLOCKTYPE
The datatype used by blockdata.
cBlockIceHandler(BLOCKTYPE a_BlockType)
cBlockHandler(BLOCKTYPE a_BlockType)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
static bool ToolHasSilkTouch(const cItem *a_Tool)
Returns true if the specified tool is valid and has a non-zero silk-touch enchantment.
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
bool IsBlockLiquid(BLOCKTYPE a_BlockType)
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
static bool FullyOccupiesVoxel(BLOCKTYPE a_Type)
BLOCKTYPE GetBlock(Vector3i a_Pos)
virtual void OnBroken(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta) override
Called after a block gets broken (replaced with air), either by player or by natural means...
This class bridges a vector of cItem for safe access via Lua.