48 a_Rotation += 180 + (180 / 16);
54 a_Rotation = (a_Rotation / 360) * 16;
56 return (static_cast<char>(a_Rotation)) % 16;
61 return (a_Meta + 4) & 0x0f;
66 return (a_Meta + 12) & 0x0f;
75 return (a_Meta < 0x08) ? (0x08 - a_Meta) : (0x18 - a_Meta);
cBlockSignPostHandler(BLOCKTYPE a_BlockType)
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override
Rotates a given block meta counter-clockwise.
virtual NIBBLETYPE MetaMirrorXY(NIBBLETYPE a_Meta) override
Mirrors a given block meta around the XY plane.
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.
static bool IsSolid(BLOCKTYPE a_Type)
unsigned char BLOCKTYPE
The datatype used by blockdata.
static NIBBLETYPE RotationToMetaData(double a_Rotation)
virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override
Rotates a given block meta clockwise.
cBlockHandler(BLOCKTYPE a_BlockType)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
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 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.
BLOCKTYPE GetBlock(int a_RelX, int a_RelY, int a_RelZ) const
virtual NIBBLETYPE MetaMirrorYZ(NIBBLETYPE a_Meta) override
Mirros a given block meta around the YZ plane.
This class bridges a vector of cItem for safe access via Lua.