diff options
author | Tec <daniel112092@gmail.com> | 2020-10-07 19:50:28 +0200 |
---|---|---|
committer | Tec <daniel112092@gmail.com> | 2020-10-07 19:50:28 +0200 |
commit | 9b640643a01ad9835f1baf4ca37cd25c558dfb6f (patch) | |
tree | 1402f4df03b911e4e6e2a71f27b1bf139eecd4b6 | |
parent | 30097b9cf11fefa9a40eaa19b0fa6d397f42d34d (diff) | |
download | GT5-Unofficial-9b640643a01ad9835f1baf4ca37cd25c558dfb6f.tar.gz GT5-Unofficial-9b640643a01ad9835f1baf4ca37cd25c558dfb6f.tar.bz2 GT5-Unofficial-9b640643a01ad9835f1baf4ca37cd25c558dfb6f.zip |
Add getters for translating relative coordinates to world
-rw-r--r-- | src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java index 2a93bcc540..5949b432df 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java @@ -128,6 +128,7 @@ public enum ExtendedFacing { private static final Map<String, ExtendedFacing> NAME_LOOKUP = stream(VALUES).collect(toMap(ExtendedFacing::getName2, (extendedFacing) -> extendedFacing)); private final ForgeDirection direction; + private final ForgeDirection a,b,c; private final Rotation rotation; private final Flip flip; @@ -206,6 +207,9 @@ public enum ExtendedFacing { default: throw new RuntimeException("More impossible..."); } + this.a=a; + this.b=b; + this.c=c; integerAxisSwap =new IntegerAxisSwap(a,b,c); } @@ -327,4 +331,28 @@ public enum ExtendedFacing { public IntegerAxisSwap getIntegerAxisSwap() { return integerAxisSwap; } + + public ForgeDirection getRelativeLeftInWorld() { + return a; + } + + public ForgeDirection getRelativeRightInWorld() { + return a.getOpposite(); + } + + public ForgeDirection getRelativeDownInWorld() { + return b; + } + + public ForgeDirection getRelativeUpInWorld() { + return b.getOpposite(); + } + + public ForgeDirection getRelativeBackInWorld() { + return c; + } + + public ForgeDirection getRelativeForwardInWorld() { + return c.getOpposite(); + } } |