Class XYZD
java.lang.Object
de.marcely.bedwars.tools.location.XYZ
de.marcely.bedwars.tools.location.XYZD
- All Implemented Interfaces:
Cloneable, ConfigurationSerializable
- Direct Known Subclasses:
ImmutableXYZD
Represents a 3-dimensional position and a compass direction
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Adds the x-coordinatesclone()static XYZDdeserialize(Map<String, Object> data) Required method for deserializationmultiply(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 direction coordinates from the given objectCopies and sets the xyz coordinates from the given objectsetX(double x) Sets the x-coordinatesetY(double y) Sets the y-coordinatesetZ(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
-
Field Details
-
dir
-
-
Constructor Details
-
XYZD
-
XYZD
-
XYZD
-
XYZD
-
XYZD
public XYZD() -
XYZD
public XYZD(double x, double y, double z) -
XYZD
-
-
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
-
getDirection
-
setDirection
-
clone
-
serialize
-
deserialize
-