diff options
author | Alexander Harkness <me@bearbin.net> | 2017-12-26 22:25:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 22:25:57 +0100 |
commit | 6309c6a97fdbabfde978358f5f9a0f61ab74f91f (patch) | |
tree | 18b76401b21bb16425d6a630e109d737afea6bb7 /src/BlockInfo.cpp | |
parent | .editorconfig fixes (#4113) (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/BlockInfo.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index 3021c5efe..c2f248a26 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -464,6 +464,16 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() Info[E_BLOCK_YELLOW_SHULKER_BOX ].m_PistonBreakable = true; + /* Blocks that block rain or snow's passage: + * All solid blocks are also rain blockers, and they are set automatically + * at the end of this function. + */ + Info[E_BLOCK_SIGN_POST ].m_IsRainBlocker = true; + Info[E_BLOCK_WALLSIGN ].m_IsRainBlocker = true; + Info[E_BLOCK_WALL_BANNER ].m_IsRainBlocker = true; + Info[E_BLOCK_STANDING_BANNER ].m_IsRainBlocker = true; + + // Blocks that can be snowed over: Info[E_BLOCK_BEDROCK ].m_IsSnowable = true; Info[E_BLOCK_BLOCK_OF_COAL ].m_IsSnowable = true; @@ -554,8 +564,8 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() Info[E_BLOCK_BIG_FLOWER ].m_IsSolid = false; Info[E_BLOCK_BROWN_MUSHROOM ].m_IsSolid = false; Info[E_BLOCK_CARROTS ].m_IsSolid = false; - Info[E_BLOCK_CHORUS_PLANT ].m_IsSolid = false; Info[E_BLOCK_CHORUS_FLOWER ].m_IsSolid = false; + Info[E_BLOCK_CHORUS_PLANT ].m_IsSolid = false; Info[E_BLOCK_COBWEB ].m_IsSolid = false; Info[E_BLOCK_CROPS ].m_IsSolid = false; Info[E_BLOCK_DANDELION ].m_IsSolid = false; @@ -575,17 +585,17 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() Info[E_BLOCK_POTATOES ].m_IsSolid = false; Info[E_BLOCK_POWERED_RAIL ].m_IsSolid = false; Info[E_BLOCK_RAIL ].m_IsSolid = false; + Info[E_BLOCK_RED_MUSHROOM ].m_IsSolid = false; Info[E_BLOCK_REDSTONE_TORCH_OFF ].m_IsSolid = false; Info[E_BLOCK_REDSTONE_TORCH_ON ].m_IsSolid = false; Info[E_BLOCK_REDSTONE_WIRE ].m_IsSolid = false; - Info[E_BLOCK_RED_MUSHROOM ].m_IsSolid = false; Info[E_BLOCK_REEDS ].m_IsSolid = false; Info[E_BLOCK_SAPLING ].m_IsSolid = false; Info[E_BLOCK_SIGN_POST ].m_IsSolid = false; Info[E_BLOCK_SNOW ].m_IsSolid = false; + Info[E_BLOCK_STANDING_BANNER ].m_IsSolid = false; Info[E_BLOCK_STATIONARY_LAVA ].m_IsSolid = false; Info[E_BLOCK_STATIONARY_WATER ].m_IsSolid = false; - Info[E_BLOCK_STANDING_BANNER ].m_IsSolid = false; Info[E_BLOCK_STONE_BUTTON ].m_IsSolid = false; Info[E_BLOCK_STONE_PRESSURE_PLATE ].m_IsSolid = false; Info[E_BLOCK_TALL_GRASS ].m_IsSolid = false; @@ -974,8 +984,9 @@ cBlockInfo::cBlockInfoArray::cBlockInfoArray() Info[E_BLOCK_RED_SHULKER_BOX ].m_Hardness = 0.2f; Info[E_BLOCK_BLACK_SHULKER_BOX ].m_Hardness = 0.2f; Info[E_BLOCK_STRUCTURE_BLOCK ].m_Hardness = -1.0f; -} - - - + for (size_t i = 0; i < Info.size(); ++i) + { + Info[i].m_IsRainBlocker |= Info[i].m_IsSolid; + } +} |