mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-23 21:39:49 +00:00
25 lines
651 B
Java
25 lines
651 B
Java
package mantle.world;
|
|
|
|
import net.minecraftforge.common.ForgeDirection;
|
|
|
|
/**
|
|
* Helper functions for dealing with ForgeDirection
|
|
*
|
|
* @author Sunstrike <[email protected]>
|
|
*/
|
|
public class DirectionUtils {
|
|
|
|
private DirectionUtils() {} // All static
|
|
|
|
public static boolean isRightAngles(ForgeDirection a, ForgeDirection b)
|
|
{
|
|
return a != b && a != b.getOpposite() && a != ForgeDirection.UNKNOWN && b != ForgeDirection.UNKNOWN;
|
|
}
|
|
|
|
public static boolean isHorizontal(ForgeDirection a)
|
|
{
|
|
return a == ForgeDirection.EAST || a == ForgeDirection.NORTH || a == ForgeDirection.SOUTH || a == ForgeDirection.WEST;
|
|
}
|
|
|
|
}
|