public final class Util
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Random |
RANDOM
An unseeded
Random for general use |
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static int |
ceil(double value) |
static java.lang.String |
colorToFormattingCode(org.newdawn.slick.Color color) |
static Entity |
createEntity(IResourceName name,
IWorld world) |
static void |
deleteFolder(java.io.File file) |
static double |
distance(double x1,
double y1,
double x2,
double y2) |
static double |
distanceSq(double x1,
double y1,
double x2,
double y2) |
static int |
floor(double value) |
static long |
getTimeMillis() |
static org.newdawn.slick.Color |
randomColor(java.util.Random rand) |
static int |
toGridPos(double worldPos) |
static int |
toIntColor(org.newdawn.slick.Color color) |
static int |
toWorldPos(int gridPos) |
static java.lang.String |
trimString(java.lang.String s,
int length) |
public static double distance(double x1,
double y1,
double x2,
double y2)
public static double distanceSq(double x1,
double y1,
double x2,
double y2)
public static int floor(double value)
public static int ceil(double value)
public static int toGridPos(double worldPos)
public static int toWorldPos(int gridPos)
public static void deleteFolder(java.io.File file)
throws java.lang.Exception
java.lang.Exceptionpublic static org.newdawn.slick.Color randomColor(java.util.Random rand)
public static int toIntColor(org.newdawn.slick.Color color)
public static java.lang.String colorToFormattingCode(org.newdawn.slick.Color color)
public static Entity createEntity(IResourceName name, IWorld world)
public static java.lang.String trimString(java.lang.String s,
int length)
public static long getTimeMillis()