fix #2083 and redstoneInputSide bug

This commit is contained in:
asiekierka 2014-10-23 15:47:28 +02:00
parent 25aedffac3
commit 95427776d4

View file

@ -679,12 +679,14 @@ public class BlockGenericPipe extends BlockBuildCraft {
if (isValid(pipe)) {
pipe.container.scheduleNeighborChange();
pipe.container.redstoneInput = world.isBlockIndirectlyGettingPowered(x, y, z) ? 15 : world
.getBlockPowerInput(x, y, z);
pipe.container.redstoneInput = world.getBlockPowerInput(x, y, z);
if (pipe.container.redstoneInput == 0) {
pipe.container.redstoneInput = world.isBlockIndirectlyGettingPowered(x, y, z) ? 15 : 0;
}
for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
ForgeDirection d = ForgeDirection.getOrientation(i);
pipe.container.redstoneInputSide[i] = world.isBlockProvidingPowerTo(x + d.offsetY, y + d.offsetY, z
pipe.container.redstoneInputSide[i] = world.isBlockProvidingPowerTo(x + d.offsetX, y + d.offsetY, z
+ d.offsetZ, i);
}
}