31 if (!a_Player.
Feed(2, 0.4))
39 a_ChunkInterface.
DigBlock(a_WorldInterface, a_BlockPos, &a_Player);
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
virtual bool OnUse(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, const Vector3i a_BlockPos, eBlockFace a_BlockFace, const Vector3i a_CursorPos) const override
Called when the user right clicks the block and the block is useable.
virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem *const a_Tool) const override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
virtual bool IsUseable(void) const override
Called to check whether this block supports a rclk action.
constexpr cBlockHandler(BLOCKTYPE a_BlockType)
bool DigBlock(cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, cEntity *a_Digger)
void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData)
Sets the meta for the specified block, while keeping the blocktype.
NIBBLETYPE GetBlockMeta(Vector3i a_Pos)
StatisticsManager & GetStatistics()
Return the associated statistic and achievement manager.
bool Feed(int a_Food, double a_Saturation)
Adds to FoodLevel and FoodSaturationLevel, returns true if any food has been consumed,...
This class bridges a vector of cItem for safe access via Lua.
std::unordered_map< CustomStatistic, StatValue > Custom