8 #include "../Blocks/BlockPiston.h" 9 #include "../BlockEntities/DropSpenserEntity.h" 17 public cMetaRotator<cBlockEntityHandler, 0x07, 0x02, 0x05, 0x03, 0x04>
34 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
35 int a_CursorX,
int a_CursorY,
int a_CursorZ,
53 if (a_BlockEntity !=
nullptr)
70 switch (a_Meta & 0x07)
72 case 0x00:
return 0x01 + OtherMeta;
73 case 0x01:
return 0x00 + OtherMeta;
static NIBBLETYPE RotationPitchToMetaData(double a_Rotation, double a_Pitch)
double GetPitch(void) const
cBlockDropSpenserHandler(BLOCKTYPE a_BlockType)
unsigned char BLOCKTYPE
The datatype used by blockdata.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
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.
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...
Mixin for rotations and reflections following the standard pattern of "apply mask, then use a switch".
virtual NIBBLETYPE MetaMirrorXZ(NIBBLETYPE a_Meta) override
Mirros a given block meta around the XZ plane.
double GetYaw(void) const
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
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.
This class bridges a vector of cItem for safe access via Lua.
void AddItemGrid(const cItemGrid &a_ItemGrid)
Adds a copy of all items in a_ItemGrid.