26 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
27 int a_CursorX,
int a_CursorY,
int a_CursorZ,
35 a_ChunkInterface.
GetBlockTypeMeta({a_BlockX, a_BlockY, a_BlockZ}, BlockBeforePlacement, MetaBeforePlacement);
42 a_BlockMeta = MetaBeforePlacement + 1;
53 a_ChunkInterface.
GetBlockTypeMeta({a_BlockX, a_BlockY - 1, a_BlockZ}, BlockBelow, MetaBelow) &&
107 return CanBeOn(BlockBelow, MetaBelow);
static float GetBlockHeight(BLOCKTYPE a_Type)
static bool CanBeOn(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Returns true if snow can be placed on top of a block with the given type and meta.
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool GetBlockTypeMeta(Vector3i a_Pos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta)
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.
const cItem & GetEquippedItem(void) const
virtual bool CanBeAt(cChunkInterface &a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk &a_Chunk) override
Checks if the block can stay at the specified relative coords in the chunk.
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.
virtual bool IsInsideBlock(Vector3d a_Position, const BLOCKTYPE a_BlockType, const NIBBLETYPE a_BlockMeta) override
Tests if a_Position is inside the block where a_Position is relative to the origin of the block Note ...
cBlockSnowHandler(BLOCKTYPE a_BlockType)
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 IsSnowable(BLOCKTYPE a_Type)
NIBBLETYPE GetMeta(int a_RelX, int a_RelY, int a_RelZ) const
virtual bool DoesDropOnUnsuitable(void) override
Returns if this block drops if it gets destroyed by an unsuitable situation.
virtual bool GetPlacementBlockTypeMeta(cChunkInterface &a_ChunkInterface, cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) override
Called before a block is placed into a world.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
BLOCKTYPE GetBlock(int a_RelX, int a_RelY, int a_RelZ) const
bool IsShovel(short a_ItemID)
virtual bool DoesIgnoreBuildCollision(cChunkInterface &a_ChunkInterface, Vector3i a_Pos, cPlayer &a_Player, NIBBLETYPE a_Meta) override
Checks if the player can build "inside" this block.
This class bridges a vector of cItem for safe access via Lua.