13 public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
23 return ((a_Meta & 0x4) == 0x4);
30 case 0x0: a_Position.
z--;
break;
31 case 0x1: a_Position.
x++;
break;
32 case 0x2: a_Position.
z++;
break;
33 case 0x3: a_Position.
x--;
break;
36 LOGWARNING(
"%s: Unknown metadata: %d", __FUNCTION__, a_Meta);
37 ASSERT(!
"Unknown metadata while determining orientation of comparator!");
51 case 0x0: a_Position.
x++;
break;
52 case 0x1: a_Position.
z--;
break;
53 case 0x2: a_Position.
x--;
break;
54 case 0x3: a_Position.
z++;
break;
57 LOGWARNING(
"%s: Unknown metadata: %d", __FUNCTION__, a_Meta);
58 ASSERT(!
"Unknown metadata while determining orientation of comparator!");
67 case 0x0: a_Position.
x--;
break;
68 case 0x1: a_Position.
z++;
break;
69 case 0x2: a_Position.
x++;
break;
70 case 0x3: a_Position.
z--;
break;
73 LOGWARNING(
"%s: Unknown metadata: %d", __FUNCTION__, a_Meta);
74 ASSERT(!
"Unknown metadata while determining orientation of comparator!");
87 case 0x0: a_Position.
z++;
break;
88 case 0x1: a_Position.
x--;
break;
89 case 0x2: a_Position.
z--;
break;
90 case 0x3: a_Position.
x++;
break;
93 LOGWARNING(
"%s: Unknown metadata: %d", __FUNCTION__, a_Meta);
94 ASSERT(!
"Unknown metadata while determining orientation of comparator!");
113 const auto Meta = a_ChunkInterface.
GetBlockMeta(a_BlockPos);
139 a_WorldInterface.
SendBlockTo(a_BlockPos, a_Player);
157 if (a_Position.
y <= 0)
@ E_META_WOODEN_SLAB_UPSIDE_DOWN
@ E_BLOCK_STAIRS_UPSIDE_DOWN
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.
void LOGWARNING(std::string_view a_Format, const Args &... args)
static bool FullyOccupiesVoxel(BLOCKTYPE Block)
Does this block fully occupy its voxel - is it a 'full' block?
static Vector3i GetRearCoordinate(Vector3i a_Position, NIBBLETYPE a_Meta)
virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem *const a_Tool) const override
static Vector3i GetSideCoordinate(Vector3i a_Position, NIBBLETYPE a_Meta, bool a_bInverse)
static Vector3i GetFrontCoordinate(Vector3i a_Position, NIBBLETYPE a_Meta)
virtual void OnCancelRightClick(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, const Vector3i a_BlockPos, eBlockFace a_BlockFace) const override
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
virtual bool OnUse(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, const Vector3i a_BlockPos, eBlockFace a_BlockFace, const Vector3i a_CursorPos) const override
virtual bool CanBeAt(const cChunk &a_Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta) const override
static bool IsInSubtractionMode(NIBBLETYPE a_Meta)
virtual bool IsUseable(void) const override
static bool IsAnySlabType(BLOCKTYPE a_BlockType)
Returns true if the specified blocktype is one of the slabs handled by this handler.
static bool IsAnyStairType(BLOCKTYPE a_Block)
void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData)
Sets the meta for the specified block, while keeping the blocktype.
NIBBLETYPE GetBlockMeta(Vector3i a_Pos)
Mixin for blocks whose meta on placement depends on the yaw of the player placing the block.
cMetaRotator< cBlockHandler, BitMask, North, East, South, West, false > Super
virtual void WakeUpSimulators(Vector3i a_Block)=0
Wakes up the simulators for the specified block.
virtual void SendBlockTo(int a_BlockX, int a_BlockY, int a_BlockZ, const cPlayer &a_Player)=0
Sends the block on those coords to the player.
void GetBlockTypeMeta(Vector3i a_RelPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) const
This class bridges a vector of cItem for safe access via Lua.
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.