mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-13 03:30:29 +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:
parent
4205f18f0c
commit
f3ce44042f
@ -309,19 +309,21 @@ public abstract class TileComputerBase extends TileGeneric implements IComputerT
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user