6 #include "../Entities/Player.h"
27 const auto Position =
Vector3f(a_BlockPos.
x + 0.5f,
static_cast<float>(a_BlockPos.
y), a_BlockPos.
z + 0.5f);
66 if (a_Digger !=
nullptr)
70 const auto Player =
static_cast<const cPlayer *
>(a_Digger);
71 if (Player->IsGameModeCreative())
@ E_META_STONE_BRICK_MOSSY
@ E_META_SILVERFISH_EGG_STONE_BRICK
@ E_META_SILVERFISH_EGG_MOSSY_STONE_BRICK
@ E_META_STONE_BRICK_ORNAMENT
@ E_META_SILVERFISH_EGG_CHISELED_STONE_BRICK
@ E_META_SILVERFISH_EGG_COBBLESTONE
@ E_META_SILVERFISH_EGG_STONE
@ E_META_SILVERFISH_EGG_CRACKED_STONE_BRICK
@ E_META_STONE_BRICK_CRACKED
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
Vector3< float > Vector3f
static bool ToolHasSilkTouch(const cItem *a_Tool)
Returns true if the specified tool is valid and has a non-zero silk-touch enchantment.
constexpr cBlockHandler(BLOCKTYPE a_BlockType)
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
static void SpawnSilverfish(cWorldInterface &a_WorldInterface, Vector3i a_BlockPos)
virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem *const a_Tool) const override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
virtual void OnBroken(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta, const cEntity *a_Digger) const override
Called after a block gets broken (replaced with air), by natural means.
virtual void BroadcastParticleEffect(const AString &a_ParticleName, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, const cClientHandle *a_Exclude=nullptr)=0
virtual cBroadcastInterface & GetBroadcastManager()=0
virtual UInt32 SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType, bool a_Baby)=0
Spawns a mob of the specified type.
bool IsPlayer(void) const
This class bridges a vector of cItem for safe access via Lua.