5 #include "../Entities/Player.h" 6 #include "../LineBlockTracer.h" 34 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace
50 public cBlockTracer::cCallbacks
59 virtual bool OnNextBlock(
int a_CBBlockX,
int a_CBBlockY,
int a_CBBlockZ,
BLOCKTYPE a_CBBlockType,
NIBBLETYPE a_CBBlockMeta,
eBlockFace a_CBEntryFace)
override 77 m_Pos.Set(a_CBBlockX, a_CBBlockY, a_CBBlockZ);
93 Tracer.Trace(Start.x, Start.y, Start.z, End.x, End.y, End.z);
95 if (Callbacks.m_HasHitFluid)
bool IsBlockWater(BLOCKTYPE a_BlockType)
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
cItemLilypadHandler(int a_ItemType)
virtual bool IsPlaceable(void) override
Blocks simply get placed.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld...
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
Vector3d GetLookVector(void) const
static bool FullyOccupiesVoxel(BLOCKTYPE a_Type)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
Vector3d GetEyePosition(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cBlockPluginInterface &a_PluginInterface, const cItem &a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
Called when the player tries to use the item (right mouse button).
cInventory & GetInventory(void)
void SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Sets the block at the specified coords to the specified value.
cWorld * GetWorld(void) const