4 #include "../Entities/Minecart.h" 25 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace
52 double x =
static_cast<double>(a_BlockX) + 0.5;
53 double y =
static_cast<double>(a_BlockY) + 0.5;
54 double z =
static_cast<double>(a_BlockZ) + 0.5;
BLOCKTYPE GetBlock(Vector3i a_BlockPos)
Returns the block type at the specified position.
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.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld...
cItemMinecartHandler(int a_ItemType)
UInt32 SpawnMinecart(Vector3d a_Pos, int a_MinecartType, const cItem &a_Content=cItem(), int a_BlockHeight=1)
Spawns an minecart at the given coordinates.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
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).
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
static const UInt32 INVALID_ID
Special ID that is considered an "invalid value", signifying no entity.
AString ItemTypeToString(short a_ItemType)
Translates itemtype into a string.