mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Yes, horizontal/vertical aren't the same, I know
This commit is contained in:
parent
eb82add938
commit
9740d4ef79
1 changed files with 6 additions and 6 deletions
|
@ -194,10 +194,10 @@ public class WorldUtil{
|
|||
}
|
||||
|
||||
/**
|
||||
* Horizontal Directions in Order:
|
||||
* Vertical Directions in Order:
|
||||
* Up, Down
|
||||
*/
|
||||
public static final ForgeDirection[] HORIZONTAL_DIRECTIONS_ORDER = new ForgeDirection[]{ForgeDirection.UP, ForgeDirection.DOWN};
|
||||
public static final ForgeDirection[] VERTICAL_DIRECTIONS_ORDER = new ForgeDirection[]{ForgeDirection.UP, ForgeDirection.DOWN};
|
||||
/**
|
||||
* Cardinal Directions in Order:
|
||||
* North, East, South, West
|
||||
|
@ -205,11 +205,11 @@ public class WorldUtil{
|
|||
public static final ForgeDirection[] CARDINAL_DIRECTIONS_ORDER = new ForgeDirection[]{ForgeDirection.NORTH, ForgeDirection.EAST, ForgeDirection.SOUTH, ForgeDirection.WEST};
|
||||
|
||||
public static ForgeDirection getDirectionBySidesInOrder(int side){
|
||||
if(side >= 0 && side < HORIZONTAL_DIRECTIONS_ORDER.length+CARDINAL_DIRECTIONS_ORDER.length){
|
||||
if(side < HORIZONTAL_DIRECTIONS_ORDER.length){
|
||||
return HORIZONTAL_DIRECTIONS_ORDER[side];
|
||||
if(side >= 0 && side < VERTICAL_DIRECTIONS_ORDER.length+CARDINAL_DIRECTIONS_ORDER.length){
|
||||
if(side < VERTICAL_DIRECTIONS_ORDER.length){
|
||||
return VERTICAL_DIRECTIONS_ORDER[side];
|
||||
}
|
||||
else return CARDINAL_DIRECTIONS_ORDER[side-HORIZONTAL_DIRECTIONS_ORDER.length];
|
||||
else return CARDINAL_DIRECTIONS_ORDER[side-VERTICAL_DIRECTIONS_ORDER.length];
|
||||
}
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue