19 public cClearMetaOnDrop<cDisplacementYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>
29 switch (a_MetaData & 0x7)
39 ASSERT(!
"Invalid Metadata");
56 typedef std::unordered_set<Vector3i, VectorHasher<int>>
Vector3iSet;
118 const Vector3i & a_BlockPos,
cWorld & a_World,
bool a_RequirePushable,
@ E_BLOCK_STANDING_BANNER
@ E_BLOCK_DAYLIGHT_SENSOR
@ E_BLOCK_REPEATING_COMMAND_BLOCK
@ E_BLOCK_ENCHANTMENT_TABLE
@ E_BLOCK_END_PORTAL_FRAME
@ E_BLOCK_CHAIN_COMMAND_BLOCK
@ E_BLOCK_PISTON_EXTENSION
@ E_BLOCK_STRUCTURE_BLOCK
@ E_BLOCK_INVERTED_DAYLIGHT_SENSOR
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.
constexpr cBlockHandler(BLOCKTYPE a_BlockType)
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
virtual void OnBroken(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta, const cEntity *a_Digger) const override
static const Byte PistonExtendAction
Piston extension block action.
static Vector3i MetadataToOffset(NIBBLETYPE a_PistonMeta)
Converts piston block's metadata into a unit vector representing the direction in which the piston wi...
static bool IsSticky(BLOCKTYPE a_BlockType)
Returns true if the piston (specified by blocktype) is a sticky piston.
static void RetractPiston(Vector3i a_BlockPos, cWorld &a_World)
std::unordered_set< Vector3i, VectorHasher< int > > Vector3iSet
static void ExtendPiston(Vector3i a_BlockPos, cWorld &a_World)
static void PushBlocks(const Vector3iSet &a_BlocksToPush, cWorld &a_World, const Vector3i &a_PushDir)
Moves a list of blocks in a specific direction.
static bool CanPushBlock(const Vector3i &a_BlockPos, cWorld &a_World, bool a_RequirePushable, Vector3iSet &a_BlocksPushed, const Vector3i &a_PushDir)
Tries to push a block and increases the pushed blocks variable.
static const Byte PistonRetractAction
Piston retraction block action.
static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData)
static bool CanPush(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Returns true if the specified block can be pushed by a piston (and left intact)
static bool IsExtended(NIBBLETYPE a_PistonMeta)
Returns true if the piston (with the specified meta) is extended.
virtual void OnBroken(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta, const cEntity *a_Digger) const override
Called after a block gets broken (replaced with air), by natural means.
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cItem *a_Tool) const override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
constexpr cBlockPistonHeadHandler(void)
Mixin to clear the block's meta value when converting to a pickup.
cYawRotator< Base, BitMask, North, East, South, West > Super
This class bridges a vector of cItem for safe access via Lua.