Fixed inverted directions in accelerator assembly scanner

This commit is contained in:
Unknown 2019-06-18 02:05:29 +02:00 committed by unknown
parent 95dd55a9c8
commit a439909b42
2 changed files with 6 additions and 6 deletions

View file

@ -400,8 +400,8 @@ public class AcceleratorSetup extends GlobalPosition {
}
private void scanCorners(@Nonnull final WorldServer world, @Nonnull final VectorI vCenter, @Nonnull final EnumFacing forgeDirection) {
final EnumFacing directionLeft = forgeDirection.rotateY();
final EnumFacing directionRight = forgeDirection.rotateYCCW();
final EnumFacing directionLeft = forgeDirection.rotateYCCW();
final EnumFacing directionRight = forgeDirection.rotateY();
for (int indexCorner = 0; indexCorner < 4; indexCorner++) {
final VectorI vector = new VectorI(
vCenter.x + ((indexCorner & 1) != 0 ? directionLeft.getXOffset() : directionRight.getXOffset()),

View file

@ -113,8 +113,8 @@ public class TrajectoryPoint extends VectorI {
}
// get main blocks
final EnumFacing directionLeft = directionMain.rotateY();
final EnumFacing directionRight = directionMain.rotateYCCW();
final EnumFacing directionLeft = directionMain.rotateYCCW();
final EnumFacing directionRight = directionMain.rotateY();
final Block blockForward = world.getBlockState(blockPos.offset(directionMain)).getBlock();
final Block blockUp = world.getBlockState(blockPos.up()).getBlock();
final Block blockDown = world.getBlockState(blockPos.down()).getBlock();
@ -338,8 +338,8 @@ public class TrajectoryPoint extends VectorI {
if (isStraightLine) {
// we just do a basic check of void shells, the full validation of magnets is done in the node evaluator
final EnumFacing directionMain = directionBackward.getOpposite();
final EnumFacing directionLeft = directionMain.rotateY();
final EnumFacing directionRight = directionLeft.rotateYCCW();
final EnumFacing directionLeft = directionMain.rotateYCCW();
final EnumFacing directionRight = directionLeft.rotateY();
final Block blockLeft = world.getBlockState(new BlockPos(x + directionLeft .getXOffset(), y, z + directionLeft .getZOffset())).getBlock();
final Block blockRight = world.getBlockState(new BlockPos(x + directionRight.getXOffset(), y, z + directionRight.getZOffset())).getBlock();
isTurning = blockLeft instanceof BlockVoidShellPlain || blockRight instanceof BlockVoidShellPlain;