6 #include "../Entities/Player.h"
28 const cItem & a_HeldItem,
bool IsBlockMaterialLeaves(BLOCKTYPE a_BlockType)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) const
Returns the strength to break a specific block.
constexpr cItemHandler(int a_ItemType)
eDurabilityLostAction
Actions that may cause durability of an item may be lost, where the magnitude of the loss depends on ...
virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) const
Returns whether this tool / item can harvest a specific block (e.g.
virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) const override
Returns whether this tool / item can harvest a specific block (e.g.
virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) const override
Get the durability lost which the item will get, when a specified action was performed.
virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) const override
Returns the strength to break a specific block.
virtual bool OnDiggingBlock(cWorld *a_World, cPlayer *a_Player, const cItem &a_HeldItem, const Vector3i a_ClickedBlockPos, eBlockFace a_ClickedBlockFace) const override
Called while the player digs a block using this item.
bool DropBlockAsPickups(Vector3i a_BlockPos, const cEntity *a_Digger=nullptr, const cItem *a_Tool=nullptr)
Digs the specified block, and spawns the appropriate pickups for it.
bool GetBlockTypeMeta(Vector3i a_BlockPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
Retrieves the block type and meta at the specified coords.