diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-13 20:01:15 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-13 20:01:15 +0100 |
commit | 99043091df952153ad4e941a30475dbd65f0c117 (patch) | |
tree | 66785e21fe7d8603bdaf04411dadc10aed2a5943 /src | |
parent | Fixed QueueSetBlock not sending to client changes (diff) | |
download | cuberite-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 |
Diffstat (limited to '')
-rw-r--r-- | src/Chunk.cpp | 12 |
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) |