5 #include "../Items/ItemHandler.h" 23 return a_ChunkInterface.
UseBlockEntity(&a_Player, a_BlockX, a_BlockY, a_BlockZ);
60 int reward = 15 + random.RandInt(14) + random.RandInt(14);
cItemHandler * GetHandler(void) const
Returns the cItemHandler responsible for this item type.
unsigned char BLOCKTYPE
The datatype used by blockdata.
MTRand & GetRandomProvider()
Returns the current thread's random number source.
const cItem & GetEquippedItem(void) const
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
cBlockMobSpawnerHandler(BLOCKTYPE a_BlockType)
Vector3< double > Vector3d
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
virtual std::vector< UInt32 > SpawnSplitExperienceOrbs(Vector3d a_Pos, int a_Reward)=0
Spawns experience orbs of the specified total value at the given location.
bool IsGameModeSurvival(void) const
Returns true if the player is in Survival mode, either explicitly, or by inheriting from current worl...
virtual bool IsUseable() override
Checks if the block can be placed at this point.
bool UseBlockEntity(cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
Use block entity on coordinate.
virtual void OnPlayerBrokeBlock(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta) override
Called just after the player breaks the block.
virtual bool OnUse(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, cPlayer &a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
Called if the user right clicks the block and the block is useable returns true if the use was succes...
This class bridges a vector of cItem for safe access via Lua.