From a439909b427bfbdeed0dab50c6857ce465c03ebe Mon Sep 17 00:00:00 2001
From: Unknown <lemadec.fr@gmail.com>
Date: Tue, 18 Jun 2019 02:05:29 +0200
Subject: [PATCH] Fixed inverted directions in accelerator assembly scanner

---
 src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java | 4 ++--
 src/main/java/cr0s/warpdrive/data/TrajectoryPoint.java  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java b/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java
index 280bd4c5..33afa2f1 100644
--- a/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java
+++ b/src/main/java/cr0s/warpdrive/data/AcceleratorSetup.java
@@ -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()),
diff --git a/src/main/java/cr0s/warpdrive/data/TrajectoryPoint.java b/src/main/java/cr0s/warpdrive/data/TrajectoryPoint.java
index 6b4a59fa..b796f774 100644
--- a/src/main/java/cr0s/warpdrive/data/TrajectoryPoint.java
+++ b/src/main/java/cr0s/warpdrive/data/TrajectoryPoint.java
@@ -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;