public class MapUtil
extends java.lang.Object
| Constructor and Description |
|---|
MapUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte |
getDirection(double degree) |
static org.bukkit.Location[] |
getLocationsAround(org.bukkit.Location center,
double scale,
double radians)
Create an array of locations for a map
|
static int[] |
getLocationToPixel(org.bukkit.Location center,
org.bukkit.Location point,
double scale,
double radians)
Convert a Location to a relative point on the map
|
static java.util.Set<MapPixel> |
getPixelsFor(java.awt.Image image,
int x,
int y) |
static org.bukkit.Location |
getPixelToLocation(org.bukkit.Location center,
double scale,
double radians,
int[] pixel) |
public static org.bukkit.Location[] getLocationsAround(org.bukkit.Location center,
double scale,
double radians)
center - The center of the mapscale - The scale in blocks per pixelradians - The amount of radians to rotatepublic static org.bukkit.Location getPixelToLocation(org.bukkit.Location center,
double scale,
double radians,
int[] pixel)
public static int[] getLocationToPixel(org.bukkit.Location center,
org.bukkit.Location point,
double scale,
double radians)
center - point - scale - radians - Amount of radians to rotate by. Add pi or 180 degrees if using a player's yaw.public static byte getDirection(double degree)
public static java.util.Set<MapPixel> getPixelsFor(java.awt.Image image, int x, int y)