5 #include "../BlockInfo.h"
31 public cBlockTracer::cCallbacks
52 m_Pos = a_BlockPosition;
61 if (!Callbacks.m_HasHitFluid)
66 a_BlockPos = Callbacks.m_Pos;
78 const cItem & a_HeldItem,
bool IsBlockWater(BLOCKTYPE a_BlockType)
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.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld.
Vector3d GetLookVector(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
Vector3d GetEyePosition(void) const
void ReplaceOneEquippedItemTossRest(const cItem &)
Removes one item from the the current equipped item stack, and attempts to add the specified item sta...
bool GetBlockFromTrace(cWorld *a_World, cPlayer *a_Player, Vector3i &a_BlockPos) const
Searches for a water source block in the line of sight.
virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cBlockPluginInterface &a_PluginInterface, const cItem &a_HeldItem, const Vector3i a_ClickedBlockPos, eBlockFace a_ClickedBlockFace) const override
Called when the player tries to use the item (right mouse button).
constexpr cItemHandler(int a_ItemType)
bool Trace(Vector3d a_Start, Vector3d a_End)
Traces one line between Start and End; returns true if the entire line was traced (until OnNoMoreHits...