Package com.marcusslover.plus.lib.world
Class WorldPoint
java.lang.Object
com.marcusslover.plus.lib.world.WorldPoint
Deprecated, for removal: This API element is subject to removal in a future version.
WorldPoints allow the storing of sets of coordinates without dealing with
chunk loading or world name storage. Unlike
Vector, Positions allow
us to store a yaw and pitch as well as being easily serializable.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.marcusslover.plus.lib.world.WorldPoint.WorldPointAdapterDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.WorldPoint(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoint(double x, double y, double z, float yaw, float pitch) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoint(String string) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoint(org.bukkit.Location location) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.Add x, y, z to WorldPointadd(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Add a WorldPoint to WorldPointorg.bukkit.LocationasLocation(org.bukkit.World world) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new Location object from this WorldPoint.Deprecated, for removal: This API element is subject to removal in a future version.Utility method that will set the coordinates to the bottom center of theWorldPointcenter()Deprecated, for removal: This API element is subject to removal in a future version.Utility method that get the center of thisWorldPointon the x, y, z axisclone()Deprecated, for removal: This API element is subject to removal in a future version.doubledistance(double x1, double y1, double z1) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).doubledistance(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and the specifiedWorldPoint.doubledistanceSquared(double x1, double y1, double z1) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).doubledistanceSquared(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and the specifiedWorldPoint.divide(double amount) Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint (x, y, z) by a double valuedivide(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint by x, y, zdivide(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint by another WorldPoint.booleanDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.booleanisBetween(WorldPoint min, WorldPoint max) Deprecated, for removal: This API element is subject to removal in a future version.booleanisChunkLoaded(org.bukkit.World world) Deprecated, for removal: This API element is subject to removal in a future version.Check if the chunk is loaded in the world for thisWorldPointmidpoint(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.Returns a position which lies in the middle between this position and the specified coordinates.midpoint(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Returns a WorldPoint which lies in the middle between this WorldPoint and the specified WorldPoint.multiply(double amount) Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint (x, y, z) by a double valuemultiply(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint by x, y, zmultiply(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint by another WorldPoint.static WorldPointof(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.static WorldPointof(double x, double y, double z, float yaw, float pitch) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.static WorldPointof(org.bukkit.Location location) Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.subtract(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version.Add x, y, z to WorldPointsubtract(WorldPoint worldPoint) Deprecated, for removal: This API element is subject to removal in a future version.Subtract a WorldPoint to WorldPointDeprecated, for removal: This API element is subject to removal in a future version.Utility method that will set the coordinates to the top center of theWorldPointtoString()Deprecated, for removal: This API element is subject to removal in a future version.org.bukkit.util.VectortoVector()Deprecated, for removal: This API element is subject to removal in a future version.zero()Deprecated, for removal: This API element is subject to removal in a future version.Utility method that will floor all values of thisWorldPoint
-
Field Details
-
ADAPTER
public static final com.marcusslover.plus.lib.world.WorldPoint.WorldPointAdapter ADAPTERDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
WorldPoint
public WorldPoint()Deprecated, for removal: This API element is subject to removal in a future version. -
WorldPoint
public WorldPoint(org.bukkit.Location location) Deprecated, for removal: This API element is subject to removal in a future version. -
WorldPoint
public WorldPoint(double x, double y, double z) Deprecated, for removal: This API element is subject to removal in a future version. -
WorldPoint
public WorldPoint(double x, double y, double z, float yaw, float pitch) Deprecated, for removal: This API element is subject to removal in a future version. -
WorldPoint
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
of
Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. UnlikeVector, Positions allow us to store ayawandpitchas well as being easily serializable. -
of
Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. UnlikeVector, Positions allow us to store ayawandpitchas well as being easily serializable. -
of
Deprecated, for removal: This API element is subject to removal in a future version.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage. UnlikeVector, Positions allow us to store ayawandpitchas well as being easily serializable. -
asLocation
public org.bukkit.Location asLocation(org.bukkit.World world) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new Location object from this WorldPoint.- Parameters:
world- some valid bukkit world- Returns:
- Location
-
distance
public double distance(double x1, double y1, double z1) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).- Parameters:
x1- the x coordinate of other WorldPointy1- the y coordinate of other WorldPointz1- the z coordinate of other WorldPoint- Returns:
- the distance between this WorldPoint and WorldPoint
(x1, y1, z1).
-
distance
Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and the specifiedWorldPoint.- Parameters:
worldPoint- the other WorldPoint- Returns:
- the distance between this WorldPoint and the specified
WorldPoint. - Throws:
NullPointerException- if the specifiedWorldPointis null
-
distanceSquared
public double distanceSquared(double x1, double y1, double z1) Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).- Parameters:
x1- the x coordinate of other WorldPointy1- the y coordinate of other WorldPointz1- the z coordinate of other WorldPoint- Returns:
- the distance between this WorldPoint and WorldPoint
(x1, y1, z1).
-
distanceSquared
Deprecated, for removal: This API element is subject to removal in a future version.Computes the distance between this WorldPoint and the specifiedWorldPoint.- Parameters:
worldPoint- the other WorldPoint- Returns:
- the distance between this WorldPoint and the specified
WorldPoint. - Throws:
NullPointerException- if the specifiedWorldPointis null
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add a WorldPoint to WorldPoint- Parameters:
worldPoint- WorldPoint to add- Returns:
- This WorldPoint
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Add x, y, z to WorldPoint- Parameters:
x- X amount to addy- Y amount to addz- Z amount to add- Returns:
- This WorldPoint
-
subtract
Deprecated, for removal: This API element is subject to removal in a future version.Subtract a WorldPoint to WorldPoint- Parameters:
worldPoint- WorldPoint to subtract- Returns:
- This WorldPoint
-
subtract
Deprecated, for removal: This API element is subject to removal in a future version.Add x, y, z to WorldPoint- Parameters:
x- X amount to subtracty- Y amount to subtractz- Z amount to subtract- Returns:
- This WorldPoint
-
multiply
Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint by x, y, z- Parameters:
x- X amount to multiplyy- Y amount to multiplyz- Z amount to multiply- Returns:
- This WorldPoint
-
multiply
Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint (x, y, z) by a double value- Parameters:
amount- The amount to multiply by- Returns:
- This WorldPoint
-
multiply
Deprecated, for removal: This API element is subject to removal in a future version.Multiply a WorldPoint by another WorldPoint. (Only affects x, y, z)- Parameters:
worldPoint- The WorldPoint to multiply by- Returns:
- This WorldPoint
-
divide
Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint by x, y, z- Returns:
- This WorldPoint
-
divide
Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint (x, y, z) by a double value- Parameters:
amount- The amount to divide by- Returns:
- This WorldPoint
-
divide
Deprecated, for removal: This API element is subject to removal in a future version.Divide a WorldPoint by another WorldPoint. (Only affects x, y, z)- Parameters:
worldPoint- The WorldPoint to divide by- Returns:
- This WorldPoint
-
isBetween
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
min- Minimum WorldPointmax- Maximum WorldPoint- Returns:
- A boolean
-
midpoint
Deprecated, for removal: This API element is subject to removal in a future version.Returns a position which lies in the middle between this position and the specified coordinates.- Parameters:
x- the X coordinate of the second endpointy- the Y coordinate of the second endpointz- the Z coordinate of the second endpoint- Returns:
- the position in the middle (new instance)
-
midpoint
Deprecated, for removal: This API element is subject to removal in a future version.Returns a WorldPoint which lies in the middle between this WorldPoint and the specified WorldPoint.- Parameters:
worldPoint- the other endpoint- Returns:
- the WorldPoint in the middle (new instance)
- Throws:
NullPointerException- if the specifiedWorldPointis null
-
toVector
public org.bukkit.util.Vector toVector()Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- A
Vector
-
isChunkLoaded
public boolean isChunkLoaded(org.bukkit.World world) Deprecated, for removal: This API element is subject to removal in a future version.Check if the chunk is loaded in the world for thisWorldPoint- Parameters:
world- World to use- Returns:
- A boolean
-
zero
Deprecated, for removal: This API element is subject to removal in a future version.Utility method that will floor all values of thisWorldPoint- Returns:
- This
WorldPoint
-
topCenter
Deprecated, for removal: This API element is subject to removal in a future version.Utility method that will set the coordinates to the top center of theWorldPoint- Returns:
- This
WorldPoint
-
bottomCenter
Deprecated, for removal: This API element is subject to removal in a future version.Utility method that will set the coordinates to the bottom center of theWorldPoint- Returns:
- This
WorldPoint
-
center
Deprecated, for removal: This API element is subject to removal in a future version.Utility method that get the center of thisWorldPointon the x, y, z axis- Returns:
- This
WorldPoint
-
getBlockX
public int getBlockX()Deprecated, for removal: This API element is subject to removal in a future version. -
getBlockY
public int getBlockY()Deprecated, for removal: This API element is subject to removal in a future version. -
getBlockZ
public int getBlockZ()Deprecated, for removal: This API element is subject to removal in a future version. -
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version. -
clone
Deprecated, for removal: This API element is subject to removal in a future version.
-