|
| enum | BlockAttrubiteFlag {
batt_obstruction = 0x0000001,
batt_breakable = 0x0000002,
batt_solid = 0x0000004,
batt_liquid = 0x0000008,
batt_blendedTexture = 0x0000010,
batt_light = 0x0000020,
batt_cubeModel = 0x0000040,
batt_customModel = 0x0000080,
batt_transparent = 0x0000100,
batt_twoTexture = 0x0000200,
batt_alphaTestTexture = 0x0000400,
batt_singleSideTex = 0x0000800,
batt_threeSideTex = 0x0001000,
batt_fourSideTex = 0x0002000,
batt_sixSideTex = 0x0004000,
batt_climbable = 0x0008000,
batt_blockcamera = 0x0010000,
batt_framemove = 0x0020000,
batt_onload = 0x0040000,
batt_color_data = 0x0080000,
batt_invisible = 0x0100000,
batt_tiling = 0x0200000
} |
| |
|
|
| BlockTemplate (uint16_t id, uint32_t attFlag, uint16_t category_id) |
| |
|
void | Init (uint32_t attFlag, uint16_t category_id) |
| |
|
uint16_t | GetID () const |
| |
|
uint16_t | GetCategoryID () const |
| |
|
uint32_t | GetAttFlag () const |
| |
|
bool | IsMatchAttribute (uint32_t attFlags) const |
| | if match any of the given attributes
|
| |
|
bool | IsMatchAttributes (uint32_t dwMask, uint32_t attFlags) const |
| | all attributes as specified in dwMask must match the value of attFlags
|
| |
|
bool | IsMatchAttributeAll (uint32_t attFlags) const |
| | if match all of the given attributes
|
| |
| bool | HasColorData () const |
| | whether the block contains color data. More...
|
| |
| void | SetAttribute (DWORD dwAtt, bool bTurnOn=true) |
| | enable or disable a given attribute. More...
|
| |
|
uint8_t | GetTorchLight () |
| | torch default to 15
|
| |
| uint8_t | GetLightValue () |
| | get light value. More...
|
| |
|
void | SetTorchLight (uint8_t value) |
| | set torch light value
|
| |
| bool | IsShadowCaster () |
| | whether it is shadow caster. More...
|
| |
|
void | SetTexture0 (const char *texName, int nIndex=0) |
| |
|
void | SetTexture1 (const char *texName) |
| |
|
void | SetNormalMap (const char *texName) |
| |
|
TextureEntity * | GetTexture0 (uint32 nUserData=0) |
| |
|
TextureEntity * | GetTexture1 () |
| |
|
TextureEntity * | GetNormalMap () |
| |
|
uint16_t | GetRenderPriority () |
| |
|
void | LoadModel (const std::string &sModelName) |
| | load from known model name
|
| |
|
void | SetAssociatedBlock (uint16_t associated_blockid) |
| | set associated block
|
| |
| BlockModel & | GetBlockModel (int nIndex=0) |
| | get the default block model. More...
|
| |
|
BlockModel & | CreateGetBlockModel (int nIndex=0) |
| |
|
BlockModel & | GetBlockModelByData (uint32 nData) |
| |
| BlockModel & | GetBlockModel (CBlockWorld *pBlockManager, uint16_t bx, uint16_t by, uint16_t bz, uint16_t nBlockData=0, Block **neighborBlocks=NULL) |
| | get model by block position. More...
|
| |
|
void | GetAABB (CBlockWorld *pBlockManager, uint16_t bx, uint16_t by, uint16_t bz, CShapeAABB *pOutAABB) |
| | get AABB in local space
|
| |
|
void | GetBoundingBoxVertices (Vector3 *pVertices, int *pNumber) |
| | get bounding box vertices
|
| |
|
bool | IsAssociatedBlockID (uint16_t block_id) |
| | whether associated
|
| |
| bool | canProvidePower () |
| | Can this block provide power. More...
|
| |
|
void | setProvidePower (bool bValue) |
| |
|
bool | isBlockNormalCube () |
| |
|
bool | isSolidBlock () |
| |
| float | GetPhysicalHeight () |
| | physical height of this block. More...
|
| |
|
float | GetPhysicalHeight (CBlockWorld *pBlockManager, uint16_t bx, uint16_t by, uint16_t bz) |
| |
|
void | SetPhysicalHeight (float fHeight) |
| |
|
void | SetRenderPriority (uint16_t priority) |
| |
|
int32_t | GetLightScatterStep () |
| | how many light to scatter between neighbor blocks.
|
| |
|
int32_t | GetLightOpacity () |
| |
|
void | SetLightOpacity (int32 nValue) |
| |
|
bool | IsFullyOpaque () |
| | solid block without alpha blending is fully opaque
|
| |
| bool | HasOpacity () |
| | if true, it is not a fully transparent block. More...
|
| |
| bool | IsTransparent () |
| | if true, it is fully transparent block. More...
|
| |
| bool | IsAlphaTestTexture () |
| | whether the block model contains no alpha tested texture. More...
|
| |
|
bool | IsAlphaBlendedTexture () |
| |
| float | GetSpeedReductionPercent () const |
| | [0,1] when player is walking into this block, this is the speed reduction. More...
|
| |
| void | SetSpeedReductionPercent (float val) |
| | [0,1] when player is walking into this block, this is the speed reduction. More...
|
| |
| void | MakeCustomLinearModelProvider (int nModelCount) |
| | make this model provider as linear for custom models. More...
|
| |
|
BlockRenderPass | GetRenderPass () const |
| |
|
void | SetRenderPass (BlockRenderPass val) |
| |
| Color | GetMapColor () const |
| | a single color as shown on the mini-map. More...
|
| |
|
void | SetMapColor (Color val) |
| |
|
DWORD | GetBlockColor (int32_t blockData) |
| |
|
DWORD | GetDiffuseColor (int32_t blockData) |
| |
|
void | setUnderWaterColor (const Color &val) |
| |
|
const Color & | getUnderWaterColor () const |
| |
|
int | getTileSize () const |
| |
block template base class.