42 World.GetBlockTypeMeta(
AddFaceDirection(a_PlacePosition, a_ClickedBlockFace,
true), ClickedBlockType, ClickedBlockMeta);
72 a_World.
GetBlockTypeMeta(NeighborPosition, NeighborBlockType, NeighborBlockMeta);
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse)
Modifies the specified coords so that they point to the block adjacent to the one specified through i...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Utilities to allow casting a cWorld to one of its interfaces without including World....
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, eBlockFace a_BlockFace)
Returns true if the torch can be placed on the specified block's face.
cWorld * GetWorld(void) const
bool PlaceBlock(Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Attempts to place the block in the world with a call to PlaceBlocks.
constexpr cItemHandler(int a_ItemType)
static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace)
Converts the block face of the neighbor to which the torch is attached, to the torch block's meta.
virtual bool CommitPlacement(cPlayer &a_Player, const cItem &a_HeldItem, const Vector3i a_PlacePosition, eBlockFace a_ClickedBlockFace, const Vector3i a_CursorPosition) const override
Performs the actual placement of this placeable item.
static eBlockFace FindSuitableFace(const cWorld &a_World, const Vector3i a_Position)
Returns a suitable neighbor's blockface to place the torch at the specified position.
bool GetBlockTypeMeta(Vector3i a_BlockPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
Retrieves the block type and meta at the specified coords.