4 #include "../Entities/Boat.h"
5 #include "../LineBlockTracer.h"
28 const cItem & a_HeldItem,
41 public cBlockTracer::cCallbacks
66 if (!Callbacks.m_HasFound)
72 auto PosAbove = Callbacks.m_Pos.Floor().addedY(1);
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.
static bool IsValidHeight(Vector3i a_BlockPosition)
Validates a height-coordinate.
static eMaterial ItemToMaterial(const cItem &a_Item)
Returns the eMaterial that should be used for a boat created from the specified item.
static const UInt32 INVALID_ID
Special ID that is considered an "invalid value", signifying no entity.
Vector3d GetLookVector(void) const
const cItem & GetEquippedItem(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
Vector3d GetEyePosition(void) const
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
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...
UInt32 SpawnBoat(double a_X, double a_Y, double a_Z, cBoat::eMaterial a_Material)
BLOCKTYPE GetBlock(Vector3i a_BlockPos) const
Returns the block type at the specified position.