Package com.marcusslover.plus.lib.world
Class WorldPoint
java.lang.Object
com.marcusslover.plus.lib.world.WorldPoint
Deprecated.
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. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.WorldPoint(double x, double y, double z) Deprecated.WorldPoint(double x, double y, double z, float yaw, float pitch) Deprecated.WorldPoint(String string) Deprecated.WorldPoint(org.bukkit.Location location) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y, double z) Deprecated.Add x, y, z to WorldPointadd(WorldPoint worldPoint) Deprecated.Add a WorldPoint to WorldPointorg.bukkit.LocationasLocation(org.bukkit.World world) Deprecated.Creates a new Location object from this WorldPoint.Deprecated.Utility method that will set the coordinates to the bottom center of theWorldPointcenter()Deprecated.Utility method that get the center of thisWorldPointon the x, y, z axisclone()Deprecated.doubledistance(double x1, double y1, double z1) Deprecated.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).doubledistance(WorldPoint worldPoint) Deprecated.Computes the distance between this WorldPoint and the specifiedWorldPoint.doubledistanceSquared(double x1, double y1, double z1) Deprecated.Computes the distance between this WorldPoint and WorldPoint(x1, y1, z1).doubledistanceSquared(WorldPoint worldPoint) Deprecated.Computes the distance between this WorldPoint and the specifiedWorldPoint.divide(double amount) Deprecated.Divide a WorldPoint (x, y, z) by a double valuedivide(double x, double y, double z) Deprecated.Divide a WorldPoint by x, y, zdivide(WorldPoint worldPoint) Deprecated.Divide a WorldPoint by another WorldPoint.booleanDeprecated.intDeprecated.intDeprecated.intDeprecated.inthashCode()Deprecated.booleanisBetween(WorldPoint min, WorldPoint max) Deprecated.booleanisChunkLoaded(org.bukkit.World world) Deprecated.Check if the chunk is loaded in the world for thisWorldPointmidpoint(double x, double y, double z) Deprecated.Returns a position which lies in the middle between this position and the specified coordinates.midpoint(WorldPoint worldPoint) Deprecated.Returns a WorldPoint which lies in the middle between this WorldPoint and the specified WorldPoint.multiply(double amount) Deprecated.Multiply a WorldPoint (x, y, z) by a double valuemultiply(double x, double y, double z) Deprecated.Multiply a WorldPoint by x, y, zmultiply(WorldPoint worldPoint) Deprecated.Multiply a WorldPoint by another WorldPoint.static WorldPointof(double x, double y, double z) Deprecated.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.WorldPoints allow the storing of sets of coordinates without dealing with chunk loading or world name storage.static WorldPointof(org.bukkit.Location location) Deprecated.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.Add x, y, z to WorldPointsubtract(WorldPoint worldPoint) Deprecated.Subtract a WorldPoint to WorldPointDeprecated.Utility method that will set the coordinates to the top center of theWorldPointtoString()Deprecated.org.bukkit.util.VectortoVector()Deprecated.zero()Deprecated.Utility method that will floor all values of thisWorldPoint
-
Field Details
-
ADAPTER
public static final com.marcusslover.plus.lib.world.WorldPoint.WorldPointAdapter ADAPTERDeprecated.
-
-
Constructor Details
-
WorldPoint
public WorldPoint()Deprecated. -
WorldPoint
public WorldPoint(org.bukkit.Location location) Deprecated. -
WorldPoint
public WorldPoint(double x, double y, double z) Deprecated. -
WorldPoint
public WorldPoint(double x, double y, double z, float yaw, float pitch) Deprecated. -
WorldPoint
Deprecated.
-
-
Method Details
-
of
Deprecated.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.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.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.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.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.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.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.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.Add a WorldPoint to WorldPoint- Parameters:
worldPoint- WorldPoint to add- Returns:
- This WorldPoint
-
add
Deprecated.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.Subtract a WorldPoint to WorldPoint- Parameters:
worldPoint- WorldPoint to subtract- Returns:
- This WorldPoint
-
subtract
Deprecated.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.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.Multiply a WorldPoint (x, y, z) by a double value- Parameters:
amount- The amount to multiply by- Returns:
- This WorldPoint
-
multiply
Deprecated.Multiply a WorldPoint by another WorldPoint. (Only affects x, y, z)- Parameters:
worldPoint- The WorldPoint to multiply by- Returns:
- This WorldPoint
-
divide
Deprecated.Divide a WorldPoint by x, y, z- Returns:
- This WorldPoint
-
divide
Deprecated.Divide a WorldPoint (x, y, z) by a double value- Parameters:
amount- The amount to divide by- Returns:
- This WorldPoint
-
divide
Deprecated.Divide a WorldPoint by another WorldPoint. (Only affects x, y, z)- Parameters:
worldPoint- The WorldPoint to divide by- Returns:
- This WorldPoint
-
isBetween
Deprecated.- Parameters:
min- Minimum WorldPointmax- Maximum WorldPoint- Returns:
- A boolean
-
midpoint
Deprecated.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.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.- Returns:
- A
Vector
-
isChunkLoaded
public boolean isChunkLoaded(org.bukkit.World world) Deprecated.Check if the chunk is loaded in the world for thisWorldPoint- Parameters:
world- World to use- Returns:
- A boolean
-
zero
Deprecated.Utility method that will floor all values of thisWorldPoint- Returns:
- This
WorldPoint
-
topCenter
Deprecated.Utility method that will set the coordinates to the top center of theWorldPoint- Returns:
- This
WorldPoint
-
bottomCenter
Deprecated.Utility method that will set the coordinates to the bottom center of theWorldPoint- Returns:
- This
WorldPoint
-
center
Deprecated.Utility method that get the center of thisWorldPointon the x, y, z axis- Returns:
- This
WorldPoint
-
getBlockX
public int getBlockX()Deprecated. -
getBlockY
public int getBlockY()Deprecated. -
getBlockZ
public int getBlockZ()Deprecated. -
toString
Deprecated. -
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
clone
Deprecated.
-