Uses of Class
net.risingworld.api.utils.Vector3i
Packages that use Vector3i
Package
Description
-
Uses of Vector3i in net.risingworld.api
Methods in net.risingworld.api with parameters of type Vector3iModifier and TypeMethodDescriptionstatic ConstructionElement
World.createConstructionElement
(int shape, int texture, float textureScale, int color, Vector3i chunkPosition, Vector3i blockPosition, Quaternion rotation, Vector3f scale) Spawns a new construction element (i.e a block) at a given position.static void
World.setTerrainDataInArea
(int terrainID, Vector3i startChunk, Vector3i startBlock, Vector3i endChunk, Vector3i endBlock, EditRestriction restriction) Modifies terrain within a given area. -
Uses of Vector3i in net.risingworld.api.events.player
Methods in net.risingworld.api.events.player that return Vector3iModifier and TypeMethodDescriptionPlayerChangeBlockPositionEvent.getNewBlockPosition()
Gets the new block position of the player.PlayerEnterChunkEvent.getNewBlockPosition()
Gets the new block position of the player.PlayerEnterChunkEvent.getNewChunkCoordinates()
Gets the coordinates of the new chunk.PlayerChangeBlockPositionEvent.getNewChunkPosition()
PlayerChangeBlockPositionEvent.getOldBlockPosition()
Gets the old block position of the player.PlayerEnterChunkEvent.getOldBlockPosition()
Gets the old block position of the player.PlayerEnterChunkEvent.getOldChunkCoordinates()
Gets the coordinates of the old, previous chunk.PlayerChangeBlockPositionEvent.getOldChunkPosition()
-
Uses of Vector3i in net.risingworld.api.objects
Methods in net.risingworld.api.objects that return Vector3iModifier and TypeMethodDescriptionPlayer.getBlockPosition()
Gets a Vector3i containing the current block position (x, y and z) of the player within the current chunk.MetaObject.getChunkPosition()
Gets the chunk position of the meta object.Player.getChunkPosition()
Gets a Vector3i containing the x, y and z coordinates of the current chunk the player is in.Sign.getChunkPosition()
Gets the chunk position of the sign object.Area.getEndBlockPosition()
Area.getEndChunkPosition()
Area.getStartBlockPosition()
Area.getStartChunkPosition()
Methods in net.risingworld.api.objects with parameters of type Vector3iModifier and TypeMethodDescriptionvoid
Player.setChunkAndBlockPosition
(Vector3i chunkPosition, Vector3i blockPosition) Sets the chunk and block position of the player (resulting in the total global position). -
Uses of Vector3i in net.risingworld.api.utils
Fields in net.risingworld.api.utils declared as Vector3iModifier and TypeFieldDescriptionstatic final Vector3i
Vector3i.ONE
A vector with values 1, 1, 1static final Vector3i
Vector3i.ZERO
A vector with values 0, 0, 0Methods in net.risingworld.api.utils that return Vector3iModifier and TypeMethodDescriptionVector3i.addLocal
(int addX, int addY, int addZ) Adds the provided values to the values of this vector.Adds the values of the provided vector to the values of this vector.Vector3i.copy()
Creates a copy of this Vector.Vector3i.crossLocal
(int v2x, int v2y, int v2z) Calculates the cross product of this vector and the provided coordinates.Vector3i.crossLocal
(Vector3i other) Calculates the cross product of this vector and another vector.Vector3i.divideLocal
(int scalar) Vector3i.divideLocal
(Vector3i other) static Vector3i
Utils.ChunkUtils.getBlockPosition
(Vector3f globalPosition, Vector3i chunkPosition) Calculates a block position (within the provided chunk position)static Vector3i
Utils.ChunkUtils.getChunkPosition
(float x, float y, float z) Calculates a chunk offset from a given global position and stores the result in aVector3i
.static Vector3i
Utils.ChunkUtils.getChunkPosition
(float x, float y, float z, Vector3i storeTo) Calculates a chunk offset from a given global position and stores the result in the providedVector3i
.static Vector3i
Utils.ChunkUtils.getChunkPosition
(Vector3f globalPosition) Calculates a chunk offset from a given global position and stores the result in aVector3i
.static Vector3i
Utils.ChunkUtils.getChunkPosition
(Vector3f globalPosition, Vector3i storeTo) Calculates a chunk offset from a given global position and stores the result in the providedVector3i
.static Vector3i
Utils.ChunkUtils.getGlobalBlockPosition
(int cx, int cy, int cz, int bx, int by, int bz) static Vector3i
Utils.ChunkUtils.getGlobalBlockPosition
(Vector3i chunkPosition, Vector3i blockPosition) RaycastResult.getObjectChunkPosition()
Gets the chunk coordinates where the element is located that was hit by this ray.Vector3i.multLocal
(int scalar) Multiplies the values of this vector with the provided scalar.Vector3i.multLocal
(int multX, int multY, int multZ) Multiplies the values of this vector with the provided values.Multiplies the values of this vector with the values of the provided vector.Vector3i.negateLocal()
Negates all values of this vector.Vector3i.normalizeLocal()
Normalizes this vector (i.e turn it into a unit vector).Vector3i.set
(int x, int y, int z) Sets the x, y and z values of this vector to the provided int values.Sets the x, y and z values of this vector to the values of the provided vector.Vector3i.setX
(int x) Sets the x value of this vector.Vector3i.setY
(int y) Sets the y value of this vector.Vector3i.setZ
(int z) Sets the z value of this vector.Vector3i.subtractLocal
(int subtractX, int subtractY, int subtractZ) Subtracts the provided values from the values of this vector.Vector3i.subtractLocal
(Vector3i other) Subtracts the values of the provided vector from the values of this vector.Vector3i.zero()
Sets all values to 0 (same setset(0, 0, 0);
).Methods in net.risingworld.api.utils with parameters of type Vector3iModifier and TypeMethodDescriptionAdds the values of the provided vector to the values of this vector.float
Vector3i.angleBetween
(Vector3i other) Gets the angle between this vector and another vector.
Please note: Both vectors need to be unit vectors (normalized).Vector3i.crossLocal
(Vector3i other) Calculates the cross product of this vector and another vector.float
Gets the distance between this vector and another vector.float
Vector3i.distanceSquared
(Vector3i other) Gets the squared distance between this vector and another Vector3i.Vector3i.divideLocal
(Vector3i other) float
Gets the dot product of this vector with the provided vector.static Vector3i
Utils.ChunkUtils.getBlockPosition
(Vector3f globalPosition, Vector3i chunkPosition) Calculates a block position (within the provided chunk position)static void
Utils.ChunkUtils.getChunkAndBlockPosition
(float x, float y, float z, Vector3i chunkPositionStore, Vector3i blockPositionStore) Calculates a chunk offset and the according block position (within this chunk) from a given global position and stores the results in the providedVector3i's
.static void
Utils.ChunkUtils.getChunkAndBlockPosition
(Vector3f globalPosition, Vector3i chunkPositionStore, Vector3i blockPositionStore) Calculates a chunk offset and the according block position (within this chunk) from a given global position and stores the results in the providedVector3i's
.static Vector3i
Utils.ChunkUtils.getChunkPosition
(float x, float y, float z, Vector3i storeTo) Calculates a chunk offset from a given global position and stores the result in the providedVector3i
.static Vector3i
Utils.ChunkUtils.getChunkPosition
(Vector3f globalPosition, Vector3i storeTo) Calculates a chunk offset from a given global position and stores the result in the providedVector3i
.static Vector3i
Utils.ChunkUtils.getGlobalBlockPosition
(Vector3i chunkPosition, Vector3i blockPosition) static Vector3f
Utils.ChunkUtils.getGlobalPosition
(Vector3i chunkPosition, Vector3i blockPosition) static Vector3f
Utils.ChunkUtils.getGlobalPosition
(Vector3i chunkPosition, Vector3i blockPosition, Vector3f storeTo) boolean
Vector3i.isOrthogonal
(Vector3i 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, y and z values of this vector to the values of the provided vector.Vector3i.subtractLocal
(Vector3i other) Subtracts the values of the provided vector from the values of this vector.Constructors in net.risingworld.api.utils with parameters of type Vector3i