Files
Mantle/src/mantle/world/DirectionUtils.java
T

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;
}
}