6 #include "../Blocks/BlockSignPost.h" 7 #include "../Blocks/BlockWallSign.h" 8 #include "../ClientHandle.h" 27 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
28 int a_CursorX,
int a_CursorY,
int a_CursorZ
34 a_World.
GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, ClickedBlock, ClickedBlockMeta);
39 if (!
super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
45 if (!isReplacingClickedBlock)
51 a_Player.GetClientHandle()->SendEditSign(a_BlockX, a_BlockY, a_BlockZ);
64 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace,
65 int a_CursorX,
int a_CursorY,
int a_CursorZ,
virtual bool IsPlaceable(void) override
Blocks simply get placed.
virtual bool DoesIgnoreBuildCollision(cChunkInterface &ChunkInterface, Vector3i a_Pos, cPlayer &a_Player, NIBBLETYPE a_Meta)
Checks if the player can build "inside" this block.
cItemSignHandler(int a_ItemType)
unsigned char BLOCKTYPE
The datatype used by blockdata.
static NIBBLETYPE RotationToMetaData(double a_Rotation)
virtual bool OnPlayerPlace(cWorld &a_World, cPlayer &a_Player, const cItem &a_EquippedItem, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
Called when the player tries to place the item (right mouse button, IsPlaceable() == true)...
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
virtual bool GetPlacementBlockTypeMeta(cWorld *a_World, 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 when the player right-clicks with this item and IsPlaceable() == true, and OnPlayerPlace() is ...
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
bool GetBlockTypeMeta(Vector3i a_BlockPos, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta)
Retrieves the block type and meta at the specified coords.
virtual bool OnPlayerPlace(cWorld &a_World, cPlayer &a_Player, const cItem &a_EquippedItem, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)
Called when the player tries to place the item (right mouse button, IsPlaceable() == true)...
cBlockHandler * BlockHandler(BLOCKTYPE a_BlockType)
double GetYaw(void) const
cChunkMap * GetChunkMap(void)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)