mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-07 22:33:52 +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;
|
if( getWorld() == null || getWorld().isRemote ) return;
|
||||||
|
|
||||||
ServerComputer computer = getServerComputer();
|
ServerComputer computer = getServerComputer();
|
||||||
if( computer != null )
|
if( computer == null ) return;
|
||||||
|
|
||||||
|
BlockPos pos = computer.getPosition();
|
||||||
|
for( EnumFacing dir : EnumFacing.VALUES )
|
||||||
{
|
{
|
||||||
BlockPos pos = computer.getPosition();
|
BlockPos offset = pos.offset( dir );
|
||||||
for( EnumFacing dir : EnumFacing.VALUES )
|
if( offset.equals( neighbour ) )
|
||||||
{
|
{
|
||||||
BlockPos offset = pos.offset( dir );
|
updateSideInput( computer, dir, offset );
|
||||||
if( offset.equals( neighbour ) )
|
return;
|
||||||
{
|
|
||||||
updateSideInput( computer, dir, offset );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the position is not any adjacent one, update all inputs.
|
||||||
|
updateInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateOutput()
|
public void updateOutput()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user