129 std::unique_ptr<cBlockHandler, sHandlerDeleter>
m_Handler;
137 public std::array<cBlockInfo, 256>
151 return ms_Info[a_Type];
static bool CanBeTerraformed(BLOCKTYPE a_Type)
static float GetBlockHeight(BLOCKTYPE a_Type)
static bool IsSolid(BLOCKTYPE a_Type)
bool m_PistonBreakable
Can a piston break this block?
unsigned char BLOCKTYPE
The datatype used by blockdata.
static cBlockHandler * GetHandler(BLOCKTYPE a_Type)
static bool IsSkylightDispersant(BLOCKTYPE a_Type)
static bool IsUseableBySpectator(BLOCKTYPE a_Type)
Custom deleter allows cBlockHandler to be an incomplete type.
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
bool m_Transparent
Is a block transparent? (https://minecraft.gamepedia.com/Opacity)
std::unique_ptr< cBlockHandler, sHandlerDeleter > m_Handler
Associated block handler.
cBlockInfo()
Creates a default BlockInfo structure, initializes all values to their defaults.
bool m_CanBeTerraformed
Can a finisher change it?
static NIBBLETYPE GetLightValue(BLOCKTYPE a_Type)
float m_Hardness
Block's hardness.
bool m_FullyOccupiesVoxel
Does this block fully occupy its voxel - is it a 'full' block?
static NIBBLETYPE GetSpreadLightFalloff(BLOCKTYPE a_Type)
bool m_UseableBySpectator
Can a spectator interact with this block.
bool m_OneHitDig
Is a block destroyed after a single hit?
BLOCKTYPE m_BlockType
The block type associated with this cBlockInfo.
static const cBlockInfo & Get(BLOCKTYPE a_Type)
Returns the associated BlockInfo structure for the specified block type.
static bool IsSnowable(BLOCKTYPE a_Type)
bool m_IsSolid
Is this block solid (player cannot walk through)?
NIBBLETYPE m_LightValue
How much light do the blocks emit on their own?
float m_BlockHeight
Block height.
static bool IsRainBlocker(BLOCKTYPE a_Type)
bool m_IsRainBlocker
Does this block block the passage of rain?
cBlockHandler * BlockHandler(BLOCKTYPE a_BlockType)
static bool FullyOccupiesVoxel(BLOCKTYPE a_Type)
static bool IsTransparent(BLOCKTYPE a_Type)
static bool IsPistonBreakable(BLOCKTYPE a_Type)
NIBBLETYPE m_SpreadLightFalloff
How much light do the blocks consume?
bool m_IsSkylightDispersant
Does this block disperse sky light? (only relevant for transparent blocks)
static bool IsOneHitDig(BLOCKTYPE a_Type)
void operator()(cBlockHandler *a_Handler)
static float GetHardness(BLOCKTYPE a_Type)