summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Blocks/BlockWallSign.h16
-rw-r--r--src/Simulator/SandSimulator.cpp5
2 files changed, 16 insertions, 5 deletions
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index 0abe9c52c..9a7d4aa58 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -40,12 +40,18 @@ public:
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- int BlockX = (a_Chunk.GetPosX() * cChunkDef::Width) + a_RelX;
- int BlockZ = (a_Chunk.GetPosZ() * cChunkDef::Width) + a_RelZ;
- GetBlockCoordsBehindTheSign(a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ), BlockX, BlockZ);
- BLOCKTYPE Type = a_ChunkInterface.GetBlock(BlockX, a_RelY, BlockZ);
+ if (a_Chunk.GetBlock(a_RelX, a_RelY, a_RelZ) != m_BlockType)
+ {
+ return true;
+ }
+
+ NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ);
+ GetBlockCoordsBehindTheSign(Meta, a_RelX, a_RelZ);
+
+ cChunk * Chunk = a_Chunk.GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ);
+ BLOCKTYPE BehindBlock = Chunk->GetBlock(a_RelX, a_RelY, a_RelZ);
- return ((Type == E_BLOCK_WALLSIGN) || (Type == E_BLOCK_SIGN_POST) || cBlockInfo::IsSolid(Type));
+ return ((BehindBlock == E_BLOCK_WALLSIGN) || (BehindBlock == E_BLOCK_SIGN_POST) || cBlockInfo::IsSolid(BehindBlock));
}
diff --git a/src/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp
index dfbd3e458..955b68717 100644
--- a/src/Simulator/SandSimulator.cpp
+++ b/src/Simulator/SandSimulator.cpp
@@ -153,6 +153,7 @@ bool cSandSimulator::CanContinueFallThrough(BLOCKTYPE a_BlockType)
{
case E_BLOCK_AIR:
case E_BLOCK_BROWN_MUSHROOM:
+ case E_BLOCK_CARROTS:
case E_BLOCK_COBWEB:
case E_BLOCK_CROPS:
case E_BLOCK_DEAD_BUSH:
@@ -166,6 +167,7 @@ bool cSandSimulator::CanContinueFallThrough(BLOCKTYPE a_BlockType)
case E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE:
case E_BLOCK_MINECART_TRACKS:
case E_BLOCK_MELON_STEM:
+ case E_BLOCK_POTATOES:
case E_BLOCK_POWERED_RAIL:
case E_BLOCK_PUMPKIN_STEM:
case E_BLOCK_REDSTONE_REPEATER_OFF:
@@ -181,11 +183,13 @@ bool cSandSimulator::CanContinueFallThrough(BLOCKTYPE a_BlockType)
case E_BLOCK_STATIONARY_WATER:
case E_BLOCK_STONE_BUTTON:
case E_BLOCK_STONE_PRESSURE_PLATE:
+ case E_BLOCK_SUGARCANE:
case E_BLOCK_TALL_GRASS:
case E_BLOCK_TORCH:
case E_BLOCK_TRAPDOOR:
case E_BLOCK_TRIPWIRE:
case E_BLOCK_TRIPWIRE_HOOK:
+ case E_BLOCK_VINES:
case E_BLOCK_WALLSIGN:
case E_BLOCK_WATER:
case E_BLOCK_WOODEN_BUTTON:
@@ -215,6 +219,7 @@ bool cSandSimulator::IsReplacedOnRematerialization(BLOCKTYPE a_BlockType)
case E_BLOCK_STATIONARY_LAVA:
case E_BLOCK_STATIONARY_WATER:
case E_BLOCK_TALL_GRASS:
+ case E_BLOCK_VINES:
case E_BLOCK_WATER:
{
return true;