summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator
diff options
context:
space:
mode:
authorAustin Martin <dashieisepic@gmail.com>2016-01-11 02:53:02 +0100
committerAustin Martin <dashieisepic@gmail.com>2016-01-11 02:53:02 +0100
commit8c7cc3ffe99dfc537fc74f346aae8008725e1baa (patch)
tree4c4ae22ad0a5ec0d95f016d3a71c7d41aa3b8737 /src/Simulator/IncrementalRedstoneSimulator
parentAdded "core.help" permission to Default rank. (diff)
downloadcuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar.gz
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar.bz2
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar.lz
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar.xz
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.tar.zst
cuberite-8c7cc3ffe99dfc537fc74f346aae8008725e1baa.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
index e196f51a1..e9543bb02 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
@@ -35,7 +35,8 @@ public:
const cVector3iArray GetTerracingConnectionOffsets(const Vector3i & a_Position)
{
cVector3iArray RelativePositions;
- bool IsYPTerracingBlocked = cBlockInfo::IsSolid(m_World.GetBlock(a_Position + OffsetYP()));
+ auto YPTerraceBlock = m_World.GetBlock(a_Position + OffsetYP());
+ bool IsYPTerracingBlocked = cBlockInfo::IsSolid(YPTerraceBlock) && !cBlockInfo::IsTransparent(YPTerraceBlock);
for (const auto & Adjacent : GetRelativeLaterals())
{
@@ -46,9 +47,10 @@ public:
{
RelativePositions.emplace_back(Adjacent + OffsetYP());
}
-
+ auto YMTerraceBlock = m_World.GetBlock(a_Position + Adjacent);
if (
- !cBlockInfo::IsSolid(m_World.GetBlock(a_Position + Adjacent)) && // IsYMTerracingBlocked (i.e. check block above lower terracing position, a.k.a. just the plain adjacent)
+ // IsYMTerracingBlocked (i.e. check block above lower terracing position, a.k.a. just the plain adjacent)
+ (!cBlockInfo::IsSolid(YMTerraceBlock) || cBlockInfo::IsTransparent(YMTerraceBlock)) &&
(m_World.GetBlock(a_Position + Adjacent + OffsetYM()) == E_BLOCK_REDSTONE_WIRE)
)
{