6 #include "../EffectID.h" 12 public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>
45 a_ChunkInterface.
SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
54 a_WorldInterface.
SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);
59 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
60 int a_CursorX,
int a_CursorY,
int a_CursorZ,
86 ASSERT(!
"Unhandled block face!");
103 ASSERT(!
"Unhandled block meta!");
130 ASSERT(!
"Unhandled blocktype in trapdoor handler!");
static bool IsSolid(BLOCKTYPE a_Type)
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.
bool UnboundedRelGetBlockType(Vector3i a_RelCoords, BLOCKTYPE &a_BlockType) const
Same as GetBlockType(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap...
virtual bool OnUse(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
Called if the user right clicks the block and the block is useable returns true if the use was succes...
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
bool UnboundedRelGetBlockMeta(Vector3i a_RelPos, NIBBLETYPE &a_BlockMeta) const
Same as GetBlockMeta(), but relative coords needn't be in this chunk (uses m_Neighbor-s or m_ChunkMap...
virtual void BroadcastSoundParticleEffect(const EffectID a_EffectID, Vector3i a_SrcPos, int a_Data, const cClientHandle *a_Exclude=nullptr)=0
virtual bool IsUseable(void) override
Checks if the block can be placed at this point.
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
virtual void OnCancelRightClick(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
Called when a right click to this block is cancelled.
static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
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...
NIBBLETYPE GetBlockMeta(Vector3i a_Pos)
static eBlockFace BlockMetaDataToBlockFace(NIBBLETYPE a_Meta)
void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty=true, bool a_ShouldInformClient=true)
Sets the meta for the specified block, while keeping the blocktype.
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.
Mixin to clear the block's meta value when converting to a pickup.
virtual void SendBlockTo(int a_BlockX, int a_BlockY, int a_BlockZ, cPlayer &a_Player)=0
Sends the block on those coords to the player.
cBlockTrapdoorHandler(BLOCKTYPE a_BlockType)
#define UNREACHABLE(x)
Use to mark code that should be impossible to reach.
virtual cBroadcastInterface & GetBroadcastManager()=0
cClientHandle * GetClientHandle(void) const
Returns the raw client handle associated with the player.