11 public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>
25 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
26 int a_CursorX,
int a_CursorY,
int a_CursorZ,
61 a_Rotation += 90 + 45;
66 if ((a_Rotation >= 0) && (a_Rotation < 90))
70 else if ((a_Rotation >= 180) && (a_Rotation < 270))
74 else if ((a_Rotation >= 90) && (a_Rotation < 180))
87 return (a_Meta & 0x0b) | ((~a_Meta) & 0x04);
111 ASSERT(!
"Unhandled blocktype in stairs handler!");
124 if (a_BlockMeta & 0x4)
128 else if ((a_BlockMeta & 0x3) == 0)
130 return a_Position.
y < ((a_Position.
x > 0.5) ? 1.0 : 0.5);
132 else if ((a_BlockMeta & 0x3) == 1)
134 return a_Position.
y < ((a_Position.
x < 0.5) ? 1.0 : 0.5);
136 else if ((a_BlockMeta & 0x3) == 2)
138 return a_Position.
y < ((a_Position.
z > 0.5) ? 1.0 : 0.5);
140 else if ((a_BlockMeta & 0x3) == 3)
142 return a_Position.
y < ((a_Position.
z < 0.5) ? 1.0 : 0.5);
cBlockStairsHandler(BLOCKTYPE a_BlockType)
unsigned char BLOCKTYPE
The datatype used by blockdata.
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.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
static NIBBLETYPE RotationToMetaData(double a_Rotation)
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...
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...
Mixin to clear the block's meta value when converting to a pickup.
virtual bool IsInsideBlock(Vector3d a_Position, const BLOCKTYPE a_BlockType, const NIBBLETYPE a_BlockMeta)
Tests if a_Position is inside the block where a_Position is relative to the origin of the block Note ...