12 public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>
25 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
26 int a_CursorX,
int a_CursorY,
int a_CursorZ,
33 a_ChunkInterface.
GetBlockTypeMeta({a_BlockX, a_BlockY, a_BlockZ}, Block, Meta);
40 a_BlockFace =
FindSuitableFace(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ);
65 ASSERT(!
"Unhandled torch direction!");
84 ASSERT(!
"Unhandled torch metadata");
119 return ((a_BlockFace ==
BLOCK_FACE_YP) && ((a_BlockMeta & 0x08) == 0x08));
158 a_ChunkInterface.
GetBlockTypeMeta({a_BlockX, a_BlockY, a_BlockZ}, BlockInQuestion, BlockInQuestionMeta);
160 if (
CanBePlacedOn(BlockInQuestion, BlockInQuestionMeta, Face))
180 if (!a_Chunk.
UnboundedRelGetBlock(a_RelX, a_RelY, a_RelZ, BlockInQuestion, BlockInQuestionMeta))
185 return CanBePlacedOn(BlockInQuestion, BlockInQuestionMeta, Face);
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.
static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool GetBlockTypeMeta(Vector3i a_Pos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta)
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.
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...
static eBlockFace FindSuitableFace(cChunkInterface &a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
Finds a suitable face to place the torch, returning BLOCK_FACE_NONE on failure.
cBlockTorchHandler(BLOCKTYPE a_BlockType)
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
NIBBLETYPE GetMeta(int a_RelX, int a_RelY, int a_RelZ) const
static bool FullyOccupiesVoxel(BLOCKTYPE a_Type)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
bool UnboundedRelGetBlock(Vector3i a_RelCoords, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
Same as GetBlock(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap in ...
static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData)
Mixin to clear the block's meta value when converting to a pickup.
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, eBlockFace a_BlockFace)