Constructor and Description |
---|
AbstractLocation() |
AbstractLocation(AbstractWorld world,
double x,
double y,
double z) |
AbstractLocation(AbstractWorld world,
double x,
double y,
double z,
float yaw,
float pitch) |
Modifier and Type | Method and Description |
---|---|
AbstractLocation |
add(AbstractLocation vec)
Adds the location by another.
|
AbstractLocation |
add(AbstractVector vec)
Adds the location by a vector.
|
AbstractLocation |
add(double xA,
double yA,
double zA) |
AbstractLocation |
clone() |
double |
distance(AbstractLocation t) |
double |
distance2D(AbstractLocation t) |
double |
distance2DSquared(AbstractLocation t) |
double |
distanceSquared(AbstractLocation t) |
boolean |
equals(Object obj) |
AbstractBiome |
getBiome() |
int |
getBlockX() |
int |
getBlockY() |
int |
getBlockZ() |
int |
getChunkX() |
int |
getChunkZ() |
AbstractVector |
getDirection()
Gets a unit-vector pointing in the direction that this Location is
facing.
|
float |
getPitch()
Gets the pitch of this location, measured in degrees.
|
AbstractWorld |
getWorld() |
double |
getX()
Gets the x-coordinate of this location
|
double |
getY()
Gets the y-coordinate of this location
|
float |
getYaw()
Gets the yaw of this location, measured in degrees.
|
double |
getZ()
Gets the z-coordinate of this location
|
int |
hashCode() |
boolean |
isLoaded() |
AbstractLocation |
multiply(double m)
Performs scalar multiplication, multiplying all components with a
scalar.
|
void |
setPitch(float pitch)
Sets the pitch of this location, measured in degrees.
|
void |
setX(double x)
Sets the x-coordinate of this location
|
void |
setY(double y)
Sets the y-coordinate of this location
|
void |
setYaw(float yaw)
Sets the yaw of this location, measured in degrees.
|
void |
setZ(double z)
Sets the z-coordinate of this location
|
AbstractLocation |
subtract(AbstractLocation vec)
Subtracts the location by another.
|
AbstractLocation |
subtract(AbstractVector vec)
Subtracts the location by a vector.
|
AbstractLocation |
subtract(double x,
double y,
double z)
Subtracts the location by another.
|
io.lumine.utils.serialize.Locus |
toLocus() |
io.lumine.utils.serialize.Position |
toPosition() |
String |
toString() |
AbstractVector |
toVector()
Constructs a new
AbstractVector based on this Location |
AbstractLocation |
zero()
Zero this location's components.
|
public AbstractLocation()
public AbstractLocation(AbstractWorld world, double x, double y, double z)
public AbstractLocation(AbstractWorld world, double x, double y, double z, float yaw, float pitch)
public io.lumine.utils.serialize.Position toPosition()
public io.lumine.utils.serialize.Locus toLocus()
public void setX(double x)
x
- X-coordinatepublic double getX()
public void setY(double y)
y
- y-coordinatepublic double getY()
public void setZ(double z)
z
- z-coordinatepublic double getZ()
public int getBlockX()
public int getBlockY()
public int getBlockZ()
public int getChunkX()
public int getChunkZ()
public float getYaw()
public void setYaw(float yaw)
yaw
- new rotation's yawpublic float getPitch()
public void setPitch(float pitch)
pitch
- new incline's pitchpublic AbstractWorld getWorld()
public double distance(AbstractLocation t) throws IllegalArgumentException
IllegalArgumentException
public double distanceSquared(AbstractLocation t) throws IllegalArgumentException
IllegalArgumentException
public double distance2D(AbstractLocation t)
public double distance2DSquared(AbstractLocation t)
public AbstractLocation add(double xA, double yA, double zA)
public AbstractVector getDirection()
public AbstractLocation add(AbstractLocation vec)
vec
- The other locationIllegalArgumentException
- for differing worldsAbstractVector
public AbstractLocation add(AbstractVector vec)
vec
- Vector to useAbstractVector
public AbstractLocation subtract(double x, double y, double z)
x
- X coordinatey
- Y coordinatez
- Z coordinateAbstractVector
public AbstractLocation subtract(AbstractLocation vec)
vec
- The other locationIllegalArgumentException
- for differing worldsAbstractVector
public AbstractLocation subtract(AbstractVector vec)
vec
- The vector to useAbstractVector
public AbstractLocation multiply(double m)
m
- The factorAbstractVector
public AbstractLocation zero()
AbstractVector
public AbstractVector toVector()
AbstractVector
based on this Locationpublic AbstractLocation clone()
public boolean isLoaded()
public AbstractBiome getBiome()
Copyright © 2020. All rights reserved.