24 public cBlockTracer::cCallbacks
36 virtual bool OnNextBlock(
int a_BlockX,
int a_BlockY,
int a_BlockZ,
BLOCKTYPE a_BlockType,
NIBBLETYPE a_BlockMeta,
eBlockFace a_EntryFace)
override 45 m_Pos.
Set(a_BlockX, a_BlockY, a_BlockZ);
56 Tracer.
Trace(Start.x, Start.y, Start.z, End.x, End.y, End.z);
58 if (!Callbacks.m_HasHitFluid)
64 a_BlockPos = Callbacks.m_Pos;
72 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace
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.
bool GetBlockFromTrace(cWorld *a_World, cPlayer *a_Player, Vector3i &a_BlockPos)
void Set(T a_x, T a_y, T a_z)
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
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).
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld...
Vector3d GetLookVector(void) const
int AddItem(const cItem &a_ItemStack, bool a_AllowNewStacks=true)
Adds as many items out of a_ItemStack as can fit.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
bool Trace(double a_StartX, double a_StartY, double a_StartZ, double a_EndX, double a_EndY, double a_EndZ)
Traces one line between Start and End; returns true if the entire line was traced (until OnNoMoreHits...
Vector3d GetEyePosition(void) const
cInventory & GetInventory(void)