summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2017-12-26 22:25:57 +0100
committerGitHub <noreply@github.com>2017-12-26 22:25:57 +0100
commit6309c6a97fdbabfde978358f5f9a0f61ab74f91f (patch)
tree18b76401b21bb16425d6a630e109d737afea6bb7 /src/BlockInfo.h
parent.editorconfig fixes (#4113) (diff)
downloadcuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar.gz
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar.bz2
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar.lz
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar.xz
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.tar.zst
cuberite-6309c6a97fdbabfde978358f5f9a0f61ab74f91f.zip
Diffstat (limited to 'src/BlockInfo.h')
-rw-r--r--src/BlockInfo.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h
index fd8408638..e7544bf2d 100644
--- a/src/BlockInfo.h
+++ b/src/BlockInfo.h
@@ -37,7 +37,10 @@ public:
/** Can a piston break this block? */
bool m_PistonBreakable;
- /** Does a block disperse sky light? (only relevant for transparent blocks) */
+ /** Does this block block the passage of rain? */
+ bool m_IsRainBlocker;
+
+ /** Does this block disperse sky light? (only relevant for transparent blocks) */
bool m_IsSkylightDispersant;
/** Can this block hold snow atop? */
@@ -79,6 +82,7 @@ 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 IsRainBlocker (BLOCKTYPE a_Type) { return Get(a_Type).m_IsRainBlocker; }
inline static bool IsSkylightDispersant (BLOCKTYPE a_Type)
{
return ((Get(a_Type).m_IsSkylightDispersant) || (Get(a_Type).m_SpreadLightFalloff > 1));
@@ -102,6 +106,7 @@ public:
, m_Transparent(false)
, m_OneHitDig(false)
, m_PistonBreakable(false)
+ , m_IsRainBlocker(false)
, m_IsSkylightDispersant(false)
, m_IsSnowable(false)
, m_IsSolid(true)
@@ -149,7 +154,3 @@ inline cBlockHandler * BlockHandler(BLOCKTYPE a_BlockType)
{
return cBlockInfo::Get(a_BlockType).m_Handler.get();
}
-
-
-
-