Class XYZYP
java.lang.Object
de.marcely.bedwars.tools.location.XYZ
de.marcely.bedwars.tools.location.XYZYP
- All Implemented Interfaces:
Cloneable
,ConfigurationSerializable
- Direct Known Subclasses:
ImmutableXYZYP
Represents a 3-dimensional position with a yaw and pitch direction
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(double x, double y, double z) Adds the x-coordinatesclone()
static XYZYP
deserialize
(Map<String, Object> data) Required method for deserializationfloat
getPitch()
float
getYaw()
multiply
(double amount) multiply
(double x, double y, double z) set
(double x, double y, double z) Sets the new coordinatesCopies and sets the xyz coordinates from the given objectCopies and sets the xyz coordinates and yaw/pitch coordinates from the given objectCopies and sets the xyz coordinates from the given objectsetPitch
(float pitch) setX
(double x) Sets the x-coordinatesetY
(double y) Sets the y-coordinatesetYaw
(float yaw) setZ
(double z) Sets the z-coordinatesubtract
(double x, double y, double z) toLocation
(World world) Converts this XYZ object to a new Location objectzero()
Sets all coordinates to 0Methods inherited from class de.marcely.bedwars.tools.location.XYZ
add, distance, distance, distanceSquared, distanceSquared, equalsBlockCoords, equalsBlockCoords, equalsBlockCoords, getBlock, getBlockX, getBlockY, getBlockZ, getX, getY, getZ, isZero, set, subtract, toVector
-
Constructor Details
-
XYZYP
-
XYZYP
-
XYZYP
-
XYZYP
-
XYZYP
public XYZYP() -
XYZYP
public XYZYP(double x, double y, double z) -
XYZYP
public XYZYP(double x, double y, double z, float yaw, float pitch)
-
-
Method Details
-
setX
Description copied from class:XYZ
Sets the x-coordinate -
setY
Description copied from class:XYZ
Sets the y-coordinate -
setZ
Description copied from class:XYZ
Sets the z-coordinate -
set
Description copied from class:XYZ
Sets the new coordinates -
set
Description copied from class:XYZ
Copies and sets the xyz coordinates from the given object -
set
Description copied from class:XYZ
Copies and sets the xyz coordinates from the given object -
add
Description copied from class:XYZ
Adds the x-coordinates -
add
-
add
-
add
-
subtract
-
subtract
-
subtract
-
subtract
-
multiply
-
multiply
-
zero
Description copied from class:XYZ
Sets all coordinates to 0 -
toLocation
Description copied from class:XYZ
Converts this XYZ object to a new Location object- Overrides:
toLocation
in classXYZ
- Parameters:
world
- The world needed for creating the Location- Returns:
- A new location whose coordinates where taken from this object
-
set
Copies and sets the xyz coordinates and yaw/pitch coordinates from the given object- Parameters:
xyz
- The object from which it shall be taken from- Returns:
- This XYZ instance
-
getYaw
public float getYaw() -
getPitch
public float getPitch() -
setYaw
-
setPitch
-
clone
-
serialize
- Specified by:
serialize
in interfaceConfigurationSerializable
- Overrides:
serialize
in classXYZ
-
deserialize
Required method for deserialization- Parameters:
data
- map to deserialize- Returns:
- deserialized xyz instance
- See Also:
-