public class WorldPixel extends java.lang.Object implements java.lang.Comparable<WorldPixel>
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
color
An ARGB color representing the color of this region.
|
protected org.bukkit.Location |
location
The location of the minimum corner, with the priority representing the y value.
|
protected double |
priority
The priority ordering from 0 to 0xFFFFFF.
|
protected org.bukkit.World |
world
The world that this pixel is in.
|
protected double |
x
The minimum x and z coordinates of the region.
|
protected double |
z
The minimum x and z coordinates of the region.
|
Constructor and Description |
---|
WorldPixel(org.bukkit.Location location,
java.awt.Color color)
Construct a WorldPixel with the color and location provided.
|
WorldPixel(org.bukkit.World world,
double x,
double z,
java.awt.Color color)
Construct a WorldPixel with the arguments provided.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(WorldPixel other) |
java.awt.Color |
getColor()
Get the color of this pixel.
|
double |
getHeight()
Get the height.
|
org.bukkit.Location |
getLocation()
Get the minimum location for this pixel.
|
double |
getPriority()
Get the priority.
|
double |
getWidth()
Get the width.
|
org.bukkit.World |
getWorld()
Get the world.
|
double |
getX()
Get the minimum x coordinate.
|
double |
getZ()
Get the minimum z coordinate.
|
boolean |
intersects(double x,
double z)
Check if this region intersects with the coordinates provided.
|
void |
setColor(java.awt.Color color)
Set the color of this pixel.
|
void |
setHeight(double height)
Set the height.
|
void |
setLocation(org.bukkit.Location location)
Set the minimum location for this pixel.
|
void |
setPriority(double y)
Set the priority.
|
void |
setWidth(double width)
Set the width.
|
void |
setWorld(org.bukkit.World world)
Set the world.
|
void |
setX(double x)
Set the minimum x coordinate.
|
void |
setZ(double z)
Set the minimum z coordinate.
|
protected org.bukkit.World world
protected double x
protected double z
protected double priority
protected org.bukkit.Location location
protected java.awt.Color color
public WorldPixel(org.bukkit.Location location, java.awt.Color color)
location
- The y value will be used as the priority. Cannot be null.color
- The color of the region, cannot be null.public WorldPixel(org.bukkit.World world, double x, double z, java.awt.Color color)
world
- The world of the pixel, cannot be null.x
- The x coordinate of the pixel.z
- The z coordinate of the pixel.color
- The color of the region, cannot be null.public boolean intersects(double x, double z)
x
- The x coordinate.z
- The z coordinate.public org.bukkit.World getWorld()
public void setWorld(org.bukkit.World world)
world
- Cannot be null.public double getX()
public void setX(double x)
x
- The x coordinate.public double getWidth()
public void setWidth(double width)
width
- Should not be 0.public double getHeight()
public void setHeight(double height)
height
- Should not be 0.public double getPriority()
public void setPriority(double y)
y
- The priority.public double getZ()
public void setZ(double z)
z
- The z coordinate.public org.bukkit.Location getLocation()
public void setLocation(org.bukkit.Location location)
location
- Cannot be null. Does not set priority.public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- An ARGB color, cannot be null.public int compareTo(WorldPixel other)
compareTo
in interface java.lang.Comparable<WorldPixel>