From 0e6a4efddf8c10e54fcee68c43795cc3c4a1dac0 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Wed, 29 Oct 2014 21:05:47 +0100 Subject: [PATCH] fix more edge cases in redstone handling --- common/buildcraft/transport/BlockGenericPipe.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 02c10e1a..65d4fe32 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -662,8 +662,13 @@ public class BlockGenericPipe extends BlockBuildCraft { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { ForgeDirection d = ForgeDirection.getOrientation(i); pipe.container.redstoneInputSide[i] = Math.max( - world.getIndirectPowerLevelTo(x + d.offsetX, y + d.offsetY, z + d.offsetZ, i), - world.getIndirectPowerLevelTo(x + d.offsetX, y + d.offsetY - 1, z + d.offsetZ, i) + world.isBlockProvidingPowerTo(x + d.offsetX, y + d.offsetY, z + d.offsetZ, i), + Math.max( + world.getIndirectPowerLevelTo(x + d.offsetX, y + d.offsetY, z + d.offsetZ, i), + world.getBlock(x + d.offsetX, y + d.offsetY - 1, z + d.offsetZ).isNormalCube() + ? world.getIndirectPowerLevelTo(x + d.offsetX, y + d.offsetY - 1, z + d.offsetZ, i) + : 0 + ) ); if (pipe.container.redstoneInput < pipe.container.redstoneInputSide[i]) { pipe.container.redstoneInput = pipe.container.redstoneInputSide[i];