diff options
author | Alexander Harkness <me@bearbin.net> | 2017-09-07 12:56:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 12:56:17 +0200 |
commit | b5a23e5cd9601a8d0779ecf930b84506fbd398d1 (patch) | |
tree | c9d53f7f718bdfc8b37143330d1536f631888333 /src/BlockInfo.h | |
parent | Switched player statistic store to save with UUID filenames. (#4002) (diff) | |
download | cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar.gz cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar.bz2 cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar.lz cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar.xz cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.tar.zst cuberite-b5a23e5cd9601a8d0779ecf930b84506fbd398d1.zip |
Diffstat (limited to 'src/BlockInfo.h')
-rw-r--r-- | src/BlockInfo.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h index 1ba818cb3..fd8408638 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -28,7 +28,7 @@ public: /** How much light do the blocks consume? */ NIBBLETYPE m_SpreadLightFalloff; - /** Is a block completely transparent? (light doesn't get decreased(?)) */ + /** Is a block transparent? (https://minecraft.gamepedia.com/Opacity) */ bool m_Transparent; /** Is a block destroyed after a single hit? */ @@ -37,6 +37,9 @@ public: /** Can a piston break this block? */ bool m_PistonBreakable; + /** Does a block disperse sky light? (only relevant for transparent blocks) */ + bool m_IsSkylightDispersant; + /** Can this block hold snow atop? */ bool m_IsSnowable; @@ -76,6 +79,10 @@ public: 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 IsSkylightDispersant (BLOCKTYPE a_Type) + { + return ((Get(a_Type).m_IsSkylightDispersant) || (Get(a_Type).m_SpreadLightFalloff > 1)); + } inline static bool IsSnowable (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSnowable; } inline static bool IsSolid (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSolid; } inline static bool IsUseableBySpectator (BLOCKTYPE a_Type) { return Get(a_Type).m_UseableBySpectator; } @@ -95,6 +102,7 @@ public: , m_Transparent(false) , m_OneHitDig(false) , m_PistonBreakable(false) + , m_IsSkylightDispersant(false) , m_IsSnowable(false) , m_IsSolid(true) , m_UseableBySpectator(false) |