summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-13 20:01:15 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-13 20:01:15 +0100
commit99043091df952153ad4e941a30475dbd65f0c117 (patch)
tree66785e21fe7d8603bdaf04411dadc10aed2a5943
parentFixed QueueSetBlock not sending to client changes (diff)
downloadcuberite-99043091df952153ad4e941a30475dbd65f0c117.tar
cuberite-99043091df952153ad4e941a30475dbd65f0c117.tar.gz
cuberite-99043091df952153ad4e941a30475dbd65f0c117.tar.bz2
cuberite-99043091df952153ad4e941a30475dbd65f0c117.tar.lz
cuberite-99043091df952153ad4e941a30475dbd65f0c117.tar.xz
cuberite-99043091df952153ad4e941a30475dbd65f0c117.tar.zst
cuberite-99043091df952153ad4e941a30475dbd65f0c117.zip
-rw-r--r--src/Chunk.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 192c1242c..42969bf6d 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1345,7 +1345,16 @@ void cChunk::WakeUpSimulators(void)
int BlockZ = z + BaseZ;
for (int y = GetHeight(x, z); y >= 0; y--)
{
- switch (cChunkDef::GetBlock(m_BlockTypes, x, y, z))
+ BLOCKTYPE Block = cChunkDef::GetBlock(m_BlockTypes, x, y, z);
+
+ // The redstone sim takes multiple blocks, use the inbuilt checker
+ if (RedstoneSimulator->IsAllowedBlock(Block))
+ {
+ RedstoneSimulator->AddBlock(BlockX, y, BlockZ, this);
+ continue;
+ }
+
+ switch (Block)
{
case E_BLOCK_WATER:
{
@@ -1359,7 +1368,6 @@ void cChunk::WakeUpSimulators(void)
}
default:
{
- RedstoneSimulator->AddBlock(BlockX, y, BlockZ, this); // Redstone simulator checks if valid redstone block already
break;
}
} // switch (BlockType)