public int calculateCornerSignal(int r)
{
int absDir = Rotation.rotateSide(side(), r);
BlockCoord cnrPos = new BlockCoord(tile()).offset(absDir);
BlockCoord pos = cnrPos.copy().offset(side());
TileMultipart t = PRLib.getMultipartTile(world(), pos);
if (t != null)
return getPartSignal(t.partMap(absDir^1), Rotation.rotationTo(absDir^1, side()^1));
return 0;