76 switch (a_OldBlockType)
82 reward = random.RandInt(2, 5);
89 reward = random.RandInt(1, 5);
96 reward = random.RandInt(3, 7);
102 reward = random.RandInt(2);
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 BLOCKTYPE
The datatype used by blockdata.
MTRand & GetRandomProvider()
Returns the current thread's random number source.
const cItem & GetEquippedItem(void) const
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
static bool ToolHasSilkTouch(const cItem *a_Tool)
Returns true if the specified tool is valid and has a non-zero silk-touch enchantment.
cEnchantments m_Enchantments
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.
Vector3< double > Vector3d
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...
cBlockOreHandler(BLOCKTYPE a_BlockType)
This class bridges a vector of cItem for safe access via Lua.