Package cn.nukkit.positiontracking
Class PositionTracking
java.lang.Object
cn.nukkit.math.Vector3
cn.nukkit.positiontracking.NamedPosition
cn.nukkit.positiontracking.PositionTracking
- All Implemented Interfaces:
Cloneable
- Author:
- joserobjr
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPositionTracking
(Level level, double x, double y, double z) PositionTracking
(Level level, Vector3 v) PositionTracking
(Position pos) PositionTracking
(String levelName, double x, double y, double z) PositionTracking
(String levelName, Vector3 v) -
Method Summary
Modifier and TypeMethodDescriptionabs()
add
(double x) add
(double x, double y) add
(double x, double y, double z) ceil()
clone()
divide
(double number) down()
down
(int step) east()
east
(int step) floor()
getIntermediateWithXValue
(Vector3 v, double x) Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.getIntermediateWithYValue
(Vector3 v, double y) Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.getIntermediateWithZValue
(Vector3 v, double z) Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.multiply
(double number) north()
north
(int step) round()
setComponents
(double x, double y, double z) setComponents
(Vector3 pos) void
setLevelName
(String levelName) south()
south
(int step) subtract()
subtract
(double x) subtract
(double x, double y) subtract
(double x, double y, double z) up()
up
(int step) west()
west
(int step) Methods inherited from class cn.nukkit.positiontracking.NamedPosition
matchesNamedPosition
Methods inherited from class cn.nukkit.math.Vector3
asBlockVector3, asVector3f, cross, distance, distance, distanceManhattan, distanceSquared, distanceSquared, dot, equals, getAxis, getChunkSectionY, getChunkVector, getChunkX, getChunkZ, getFloorX, getFloorY, getFloorZ, getForward, getRight, getSideVec, getSouth, getUp, getWest, getX, getY, getZ, hashCode, length, lengthSquared, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, normalize, rawHashCode, setComponentsAdding, setComponentsAdding, setX, setY, setZ, toString
-
Constructor Details
-
PositionTracking
@PowerNukkitOnly @Since("1.4.0.0-PN") public PositionTracking(@NotNull String levelName, double x, double y, double z) -
PositionTracking
@PowerNukkitOnly @Since("1.4.0.0-PN") public PositionTracking(@NotNull Level level, double x, double y, double z) -
PositionTracking
-
PositionTracking
-
PositionTracking
-
PositionTracking
-
-
Method Details
-
getLevelName
- Specified by:
getLevelName
in classNamedPosition
-
setLevelName
-
add
-
add
-
add
-
add
-
subtract
-
subtract
-
subtract
-
subtract
-
subtract
-
multiply
-
divide
-
ceil
-
floor
-
round
-
abs
-
getSide
-
getSide
-
up
-
up
-
down
-
down
-
north
-
north
-
south
-
south
-
east
-
east
-
west
-
west
-
getIntermediateWithXValue
Description copied from class:Vector3
Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.- Overrides:
getIntermediateWithXValue
in classVector3
- Parameters:
v
- vectorx
- x value- Returns:
- intermediate vector
-
getIntermediateWithYValue
Description copied from class:Vector3
Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.- Overrides:
getIntermediateWithYValue
in classVector3
- Parameters:
v
- vectory
- y value- Returns:
- intermediate vector
-
getIntermediateWithZValue
Description copied from class:Vector3
Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.- Overrides:
getIntermediateWithZValue
in classVector3
- Parameters:
v
- vectorz
- z value- Returns:
- intermediate vector
-
setComponents
- Overrides:
setComponents
in classVector3
-
setComponents
- Overrides:
setComponents
in classVector3
-
clone
- Overrides:
clone
in classNamedPosition
-