Constructor and Description |
---|
Location(World w,
double x,
double y,
double z) |
Location(World w,
double x,
double y,
double z,
float yaw,
float pitch) |
Modifier and Type | Method and Description |
---|---|
Location |
add(double x,
double y,
double z) |
Location |
add(Location other) |
Location |
add(Vector other) |
Location |
clone() |
double |
distance(@NonNull Location o)
Get distance with given location
|
double |
distanceSquared(@NonNull Location o)
Get squared distance with given location
|
double |
distanceSquaredXZ(@NonNull Location o)
Get squared distance in X/Z axis with given location
|
double |
distanceXZ(@NonNull Location o)
Get distance in X/Z axis with given location
|
boolean |
equals(Object obj) |
Block |
getBlock() |
BlockChecker |
getBlockChecker(double size)
Get block checker with current size
|
BlockChecker |
getBlockChecker(double sizeX,
double sizeY,
double sizeZ)
Get block checker with current size
|
BlockChecker |
getBlockCheckerXZ(double size)
Get block checker with current size
|
int |
getBlockX() |
int |
getBlockY() |
int |
getBlockZ() |
Vector |
getDirection() |
float |
getPitch() |
World |
getWorld() |
double |
getX() |
double |
getY() |
float |
getYaw() |
double |
getZ() |
int |
hashCode() |
void |
setPitch(float pitch) |
void |
setWorld(World w) |
void |
setX(double x) |
void |
setY(double y) |
void |
setYaw(float yaw) |
void |
setZ(double z) |
Location |
sub(double x,
double y,
double z) |
Location |
sub(Location other) |
Location |
sub(Vector other) |
Vector |
toBlockVector() |
String |
toString() |
Vector |
toVector() |
public Location(World w, double x, double y, double z)
public Location(World w, double x, double y, double z, float yaw, float pitch)
public World getWorld()
public void setWorld(World w)
public double getX()
public int getBlockX()
public void setX(double x)
public double getY()
public int getBlockY()
public void setY(double y)
public double getZ()
public int getBlockZ()
public void setZ(double z)
public float getYaw()
public void setYaw(float yaw)
public float getPitch()
public void setPitch(float pitch)
public Location sub(double x, double y, double z)
public Location add(double x, double y, double z)
public Vector toVector()
public Vector toBlockVector()
public Block getBlock()
public Vector getDirection()
public double distance(@NonNull Location o)
o
- other locationpublic double distanceSquared(@NonNull Location o)
o
- other locationpublic double distanceXZ(@NonNull Location o)
o
- other locationpublic double distanceSquaredXZ(@NonNull Location o)
o
- other locationpublic BlockChecker getBlockChecker(double size)
size
- the size of checker (used for x/y/z)public BlockChecker getBlockCheckerXZ(double size)
size
- the size of checker (used for x/z)public BlockChecker getBlockChecker(double sizeX, double sizeY, double sizeZ)
sizeX
- the X sizesizeY
- the Y sizesizeZ
- the Z size