diff options
author | andrew <xdotftw@gmail.com> | 2014-03-02 15:24:09 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-03-02 15:24:09 +0100 |
commit | 0c87341631198386c765bc18848fbd93e66c1aab (patch) | |
tree | f8eefb74176afdcd6a1752c074900122a49de94c /src/BlockInfo.h | |
parent | APIDump: ID -> Type (diff) | |
download | cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar.gz cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar.bz2 cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar.lz cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar.xz cuberite-0c87341631198386c765bc18848fbd93e66c1aab.tar.zst cuberite-0c87341631198386c765bc18848fbd93e66c1aab.zip |
Diffstat (limited to 'src/BlockInfo.h')
-rw-r--r-- | src/BlockInfo.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h index 57092ca54..34a845b20 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -19,7 +19,7 @@ public: // tolua_begin /** Returns the associated BlockInfo structure. */ - static cBlockInfo & GetById(unsigned int a_ID); + static cBlockInfo & Get(BLOCKTYPE a_Type); /** How much light do the blocks emit on their own? */ @@ -50,15 +50,15 @@ public: bool m_FullyOccupiesVoxel; - inline static NIBBLETYPE GetLightValue (unsigned int a_ID) { return GetById(a_ID).m_LightValue; } - inline static NIBBLETYPE GetSpreadLightFalloff(unsigned int a_ID) { return GetById(a_ID).m_SpreadLightFalloff; } - inline static bool IsTransparent (unsigned int a_ID) { return GetById(a_ID).m_Transparent; } - inline static bool IsOneHitDig (unsigned int a_ID) { return GetById(a_ID).m_OneHitDig; } - inline static bool IsPistonBreakable (unsigned int a_ID) { return GetById(a_ID).m_PistonBreakable; } - inline static bool IsSnowable (unsigned int a_ID) { return GetById(a_ID).m_IsSnowable; } - inline static bool RequiresSpecialTool (unsigned int a_ID) { return GetById(a_ID).m_RequiresSpecialTool; } - inline static bool IsSolid (unsigned int a_ID) { return GetById(a_ID).m_IsSolid; } - inline static bool FullyOccupiesVoxel (unsigned int a_ID) { return GetById(a_ID).m_FullyOccupiesVoxel; } + inline static NIBBLETYPE GetLightValue (BLOCKTYPE a_Type) { return Get(a_Type).m_LightValue; } + inline static NIBBLETYPE GetSpreadLightFalloff(BLOCKTYPE a_Type) { return Get(a_Type).m_SpreadLightFalloff; } + inline static bool IsTransparent (BLOCKTYPE a_Type) { return Get(a_Type).m_Transparent; } + inline static bool IsOneHitDig (BLOCKTYPE a_Type) { return Get(a_Type).m_OneHitDig; } + inline static bool IsPistonBreakable (BLOCKTYPE a_Type) { return Get(a_Type).m_PistonBreakable; } + inline static bool IsSnowable (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSnowable; } + inline static bool RequiresSpecialTool (BLOCKTYPE a_Type) { return Get(a_Type).m_RequiresSpecialTool; } + inline static bool IsSolid (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSolid; } + inline static bool FullyOccupiesVoxel (BLOCKTYPE a_Type) { return Get(a_Type).m_FullyOccupiesVoxel; } // tolua_end |