55 switch (a_ClickedBlockFace)
60 return a_BaseMeta & 0x07;
65 return a_BaseMeta | 0x08;
72 if (a_CursorPosition.
y > 7)
75 return a_BaseMeta | 0x08;
80 return a_BaseMeta & 0x07;
91 switch (a_SingleSlabBlockType)
@ E_BLOCK_DOUBLE_WOODEN_SLAB
@ E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB
@ E_BLOCK_DOUBLE_STONE_SLAB
@ E_BLOCK_PURPUR_DOUBLE_SLAB
@ E_BLOCK_RED_SANDSTONE_SLAB
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.
static bool IsAnySlabType(BLOCKTYPE a_BlockType)
Returns true if the specified blocktype is one of the slabs handled by this handler.
cWorld * GetWorld(void) const
void SendBlocksAround(Vector3i a_BlockPos, int a_Range=1)
Sends the block in the specified range around the specified coord to the client as a block change pac...
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 FaceToMetaData(const NIBBLETYPE a_BaseMeta, const eBlockFace a_ClickedBlockFace, const Vector3i a_CursorPosition)
virtual bool CommitPlacement(cPlayer &a_Player, const cItem &a_HeldItem, const Vector3i a_PlacePosition, const eBlockFace a_ClickedBlockFace, const Vector3i a_CursorPosition) const override
Performs the actual placement of this placeable item.
static BLOCKTYPE GetDoubleSlabType(BLOCKTYPE a_SingleSlabBlockType)
Converts the single-slab blocktype to its equivalent double-slab blocktype.
BLOCKTYPE GetBlock(Vector3i a_BlockPos) const
Returns the block type at the specified position.