Verwendungen von Klasse
net.risingworld.api.utils.Vector2i
Package
Beschreibung
-
Verwendungen von Vector2i in net.risingworld.api.events.player
Modifizierer und TypMethodeBeschreibungPlayerEnterSectorEvent.getNewSectorCoordinates()
Gets the coordinates of the new sector.
Note: Sectors only have two dimensional x and z coordinates (horizontally).
Since the coordinates are stored in aVector2i
, the z coordinate will be stored in the y value.PlayerEnterWorldPartEvent.getNewWorldPartCoordinates()
Gets the coordinates of the new world part.
Note: World parts only have two dimensional x and z coordinates (horizontally).
Since the coordinates are stored in aVector2i
, the z coordinate will be stored in the y value.PlayerEnterSectorEvent.getOldSectorCoordinates()
Gets the coordinates of the old, previous sector.
Note: Sectors only have two dimensional x and z coordinates (horizontally).
Since the coordinates are stored in aVector2i
, the z coordinate will be stored in the y value.PlayerEnterWorldPartEvent.getOldWorldPartCoordinates()
Gets the coordinates of the old, previous world part.
Note: World parts only have two dimensional x and z coordinates (horizontally).
Since the coordinates are stored in aVector2i
, the z coordinate will be stored in the y value. -
Verwendungen von Vector2i in net.risingworld.api.objects
Modifizierer und TypMethodeBeschreibungPlayer.getSectorPosition()
Gets a Vector2i containing the x and z coordinates of the current sector the player is in.Player.getWorldPartPosition()
Gets a Vector2i containing the x and z coordinates of the current world part the player is in. -
Verwendungen von Vector2i in net.risingworld.api.utils
Modifizierer und TypFeldBeschreibungstatic final Vector2i
Vector2i.ONE
A vector with values 1, 1static final Vector2i
Vector2i.ZERO
A vector with values 0, 0Modifizierer und TypMethodeBeschreibungVector2i.addLocal
(int addX, int addY) Adds the provided values to the values of this vector.Adds the values of the provided vector to the values of this vector.Vector2i.copy()
Creates a copy of this Vector.Vector2i.divideLocal
(int scalar) Vector2i.divideLocal
(Vector2i other) Vector2i.multLocal
(int scalar) Multiplies the values of this vector with the provided scalar.Vector2i.multLocal
(int multX, int multY) Multiplies the values of this vector with the provided values.Multiplies the values of this vector with the values of the provided vector.Vector2i.negateLocal()
Negates all values of this vector.Vector2i.normalizeLocal()
Normalizes this vector (i.e turn it into a unit vector).Vector2i.set
(int x, int y) Sets the x, y and z values of this vector to the provided int values.Sets the x and y values of this vector to the values of the provided vector.Vector2i.setX
(int x) Sets the x value of this vector.Vector2i.setY
(int y) Sets the y value of this vector.Vector2i.subtractLocal
(int subtractX, int subtractY) Subtracts the provided values from the values of this vector.Vector2i.subtractLocal
(Vector2i other) Subtracts the values of the provided vector from the values of this vector.Vector2i.zero()
Sets all values to 0 (same setset(0, 0);
).Modifizierer und TypMethodeBeschreibungAdds the values of the provided vector to the values of this vector.float
Vector2i.angleBetween
(Vector2i other) Gets the angle between this vector and another vector.
Please note: Both vectors need to be unit vectors (normalized).float
Gets the distance between this vector and another vector.float
Vector2i.distanceSquared
(Vector2i other) Gets the squared distance between this vector and another Vector2i.Vector2i.divideLocal
(Vector2i other) float
Gets the dot product of this vector with the provided vector.boolean
Vector2i.isOrthogonal
(Vector2i other) Checks if this vector is orthogonal to another vector (i.e the angle between both vectors is ~ 90° degree).Multiplies the values of this vector with the values of the provided vector.Sets the x and y values of this vector to the values of the provided vector.Vector2i.subtractLocal
(Vector2i other) Subtracts the values of the provided vector from the values of this vector.