1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

Update all inputs if the block is not a neighbour

Fixes #172, and acts as a workaround for MrTJP/ProjectRed#1472.
This commit is contained in:
SquidDev 2019-04-08 14:52:24 +01:00
parent 4205f18f0c
commit f3ce44042f

View File

@ -309,19 +309,21 @@ public void updateInput( BlockPos neighbour )
if( getWorld() == null || getWorld().isRemote ) return;
ServerComputer computer = getServerComputer();
if( computer != null )
if( computer == null ) return;
BlockPos pos = computer.getPosition();
for( EnumFacing dir : EnumFacing.VALUES )
{
BlockPos pos = computer.getPosition();
for( EnumFacing dir : EnumFacing.VALUES )
BlockPos offset = pos.offset( dir );
if( offset.equals( neighbour ) )
{
BlockPos offset = pos.offset( dir );
if( offset.equals( neighbour ) )
{
updateSideInput( computer, dir, offset );
break;
}
updateSideInput( computer, dir, offset );
return;
}
}
// If the position is not any adjacent one, update all inputs.
updateInput();
}
public void updateOutput()