}
public int calcInputA()
{
int absDir = Rotation.rotateSide(gate.side(), gate.toAbsolute(2));
BlockCoord pos = new BlockCoord(gate.tile()).offset(absDir);
Block block = gate.world().getBlock(pos.x, pos.y, pos.z);
if (block != null)
{
if (block.hasComparatorInputOverride())
return block.getComparatorInputOverride(gate.world(), pos.x, pos.y, pos.z, absDir^1);
if (block.isNormalCube(gate.world(), pos.x, pos.y, pos.z))
{
pos.offset(absDir);
block = gate.world().getBlock(pos.x, pos.y, pos.z);
if (block != null && block.hasComparatorInputOverride())
return block.getComparatorInputOverride(gate.world(), pos.x, pos.y, pos.z, absDir^1);
}
}