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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Adds the x-coordinatesclone()static XYZYPdeserialize(Map<String, Object> data) Required method for deserializationfloatgetPitch()floatgetYaw()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 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
-
setY
-
setZ
-
set
-
set
-
set
-
add
-
add
-
add
-
add
-
subtract
-
subtract
-
subtract
-
subtract
-
multiply
-
multiply
-
zero
-
toLocation
Description copied from class:XYZConverts this XYZ object to a new Location object- Overrides:
toLocationin classXYZ- Parameters:
world- The world needed for creating the Location- Returns:
- A new location whose coordinates where taken from this object
-
set
-
getYaw
public float getYaw() -
getPitch
public float getPitch() -
setYaw
-
setPitch
-
clone
-
serialize
-
deserialize
-