mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Ran formatter, organise imports and cleanup on code to get it all ion sync.
This commit is contained in:
1 parent
485ef1733b
commit
c37faa8549
147 files changed
+2343
-2513
No files matched your search
@@ -1,37 +1,37 @@
|
||||
package crazypants.util;
|
||||
|
||||
import crazypants.vecmath.Vector3d;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import crazypants.vecmath.Vector3d;
|
||||
|
||||
public final class ForgeDirectionOffsets {
|
||||
|
||||
public static final Vector3d[] OFFSETS = new Vector3d[ForgeDirection.values().length];
|
||||
|
||||
|
||||
static {
|
||||
for(ForgeDirection dir : ForgeDirection.values()) {
|
||||
OFFSETS[dir.ordinal()] = new Vector3d(dir.offsetX,dir.offsetY,dir.offsetZ);
|
||||
}
|
||||
for (ForgeDirection dir : ForgeDirection.values()) {
|
||||
OFFSETS[dir.ordinal()] = new Vector3d(dir.offsetX, dir.offsetY, dir.offsetZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Vector3d forDir(ForgeDirection dir) {
|
||||
return OFFSETS[dir.ordinal()];
|
||||
}
|
||||
|
||||
|
||||
public static Vector3d forDirCopy(ForgeDirection dir) {
|
||||
return new Vector3d(OFFSETS[dir.ordinal()]);
|
||||
}
|
||||
|
||||
|
||||
public static Vector3d offsetScaled(ForgeDirection dir, double scale) {
|
||||
Vector3d res = forDirCopy(dir);
|
||||
res.scale(scale);
|
||||
return res;
|
||||
}
|
||||
|
||||
private ForgeDirectionOffsets() {
|
||||
|
||||
private ForgeDirectionOffsets() {
|
||||
}
|
||||
|
||||
public static boolean isPositiveOffset(ForgeDirection dir) {
|
||||
return dir == ForgeDirection.SOUTH || dir == ForgeDirection.EAST || dir == ForgeDirection.UP;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user