25 const cItem & a_HeldItem,
31 if (a_ClickedBlockFace < 0)
AString ItemTypeToString(short a_ItemType)
Translates itemtype into a string.
@ E_BLOCK_MINECART_TRACKS
unsigned char BLOCKTYPE
The datatype used by blockdata.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Vector3< double > Vector3d
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld.
static const UInt32 INVALID_ID
Special ID that is considered an "invalid value", signifying no entity.
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
constexpr cItemHandler(int a_ItemType)
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).
BLOCKTYPE GetBlock(Vector3i a_BlockPos) const
Returns the block type at the specified position.
UInt32 SpawnMinecart(Vector3d a_Pos, int a_MinecartType, const cItem &a_Content=cItem(), int a_BlockHeight=1)
Spawns an minecart at the given coordinates.