Verwendungen von Klasse
net.risingworld.api.utils.Quaternion
Package
Beschreibung
-
Verwendungen von Quaternion in net.risingworld.api
Modifizierer und TypMethodeBeschreibungstatic Quaternion
Server.getDefaultSpawnRotation()
Gets the default spawn rotation.Modifizierer und TypMethodeBeschreibungstatic ConstructionElement
World.createConstructionElement
(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale) Spawns a new construction element (i.e a block) at a given position.static ConstructionElement
World.createConstructionElement
(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale, Vector3f surfaceOffset, Vector3f surfaceScale) Spawns a new construction element (i.e a block) at a given position.static 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 ObjectElement
World.createObject
(int typeID, int variant, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale) Spawns a new object (e.g doors, furniture, lamps etc) at a given position.static Plant
World.createPlant
(int typeID, Vector3f worldPosition, Quaternion rotation, Vector3f scale) static void
Server.setDefaultSpawnRotation
(Quaternion quaternion) Sets the default spawn rotation.static WorldItem
World.spawnClothingItem
(short clothingID, int variant, int stack, int color, long infoID, Vector3f position, Quaternion rotation, boolean physical) Spawns a global clothing item in the world, i.e an item which represents a garment.static WorldItem
World.spawnConstructionItem
(byte constructionID, int texture, int stack, int color, Vector3f position, Quaternion rotation, boolean physical) static WorldItem
World.spawnItem
(short itemID, int texture, int stack, Vector3f position, Quaternion rotation, boolean physical) Spawns an item in the world.static Npc
World.spawnNpc
(short typeID, int variant, Vector3f position, Quaternion rotation) Spawns a new npc in the world.static Npc
World.spawnNpc
(short typeID, int variant, Vector3f position, Quaternion rotation, boolean temporary) Spawns a new npc in the world.static Npc
World.spawnNpc
(short typeID, Vector3f position, Quaternion rotation) Spawns a new npc in the world.static WorldItem
World.spawnObjectItem
(short objectID, int variant, int stack, Vector3f position, Quaternion rotation, boolean physical) Spawns an object item in the world, i.e an item which represents an object.static Vehicle
World.spawnVehicle
(short typeID, int constructionStage, int color, Vector3f position, Quaternion rotation) Spawns a new vehicle in the world.static void
World.triggerExplosion
(Vector3f position, Quaternion rotation, Vector3f scale, float damageFactor) Creates an explosion in the world. -
Verwendungen von Quaternion in net.risingworld.api.definitions
Modifizierer und TypFeldBeschreibungNpcs.NpcDefinition.headrotation
Default head rotation (worldspace).Npcs.NpcDefinition.mouthrotation
Default mouth rotation (worldspace).Items.ItemDefinition.renderrotation
Optional rotation when rendering the item (e.g as custom icon or for crafting preview)Objects.ObjectDefinition.renderrotation
Optional offset rotation when rendering the object icon (default rotation will be multiplied with this optional rotation)Plants.PlantDefinition.renderrotation
Optional plant rotation when rendering the plant iconItems.ItemDefinition.rotation
Item model rotation when holding in handsObjects.ObjectDefinition.rotationoffset
Optional additional rotation that is applied to the model when placing itObjects.ObjectDefinition.selectorhelperrotation
If there is a helper object, this is the local rotation of it (euler angles)Items.ItemInfo.targetitemrotation
Only for world items: Rotation offset after performing the action -
Verwendungen von Quaternion in net.risingworld.api.events.npc
-
Verwendungen von Quaternion in net.risingworld.api.events.player
Modifizierer und TypMethodeBeschreibungPlayerWeaponFireEvent.getFireRotation()
PlayerSetSpawnPointEvent.getNewSpawnRotation()
PlayerSetSpawnPointEvent.getOldSpawnRotation()
Gets the previously set spawn rotation for this type (if any was set).PlayerChangePositionEvent.getRotation()
PlayerDropItemEvent.getRotation()
Gets the item drop rotation (rotation of the item).PlayerDropItemFromStorageEvent.getRotation()
Gets the item drop rotation (rotation of the item).PlayerRespawnEvent.getSpawnRotation()
Gets the spawn rotation.PlayerSpawnEvent.getSpawnRotation()
Gets the spawn rotation.Modifizierer und TypMethodeBeschreibungvoid
PlayerWeaponFireEvent.setFireRotation
(Quaternion rotation) void
PlayerSetSpawnPointEvent.setNewSpawnRotation
(Quaternion rotation) void
PlayerChangePositionEvent.setRotation
(Quaternion quaternion) void
PlayerRespawnEvent.setSpawnRotation
(Quaternion rotation) Sets the spawn rotation of the player. -
Verwendungen von Quaternion in net.risingworld.api.events.player.world
Modifizierer und TypMethodeBeschreibungPlayerEditConstructionEvent.getNewRotation()
Gets the new rotation of the construction element as a Quaternion.PlayerPlaceBlueprintEvent.getRotation()
Gets the world rotation of the blueprint.PlayerPlaceObjectEvent.getRotation()
Gets the rotation of the object as a Quaternion.Modifizierer und TypMethodeBeschreibungvoid
PlayerPlaceBlueprintEvent.setRotation
(Quaternion rotation) Changes the rotation of the blueprint.void
PlayerPlaceConstructionEvent.setRotation
(Quaternion rotation) Changes the rotation of the construction element.void
PlayerPlaceObjectEvent.setRotation
(Quaternion rotation) Changes the object rotation.void
PlayerPlaceVegetationEvent.setRotation
(Quaternion rotation) Changes the plant rotation. -
Verwendungen von Quaternion in net.risingworld.api.events.world
Modifizierer und TypMethodeBeschreibungPlantGrowthEvent.getPlantRotation()
Gets the current rotation of the plant as a Quaternion. -
Verwendungen von Quaternion in net.risingworld.api.objects
Modifizierer und TypMethodeBeschreibungNpc.getRotation()
Gets the current rotation of the npc.Player.getRotation()
Gets the current player rotation.Vehicle.getRotation()
Gets the rotation of the vehicle.WorldItem.getRotation()
Gets a Quaternion containing the current rotation of this item.Player.getSpawnRotation
(SpawnPointType spawnPoint) Gets the spawn rotation for this player (i.e where the player would respawn upon death).Modifizierer und TypMethodeBeschreibungvoid
Player.respawn
(Vector3f position, Quaternion rotation) Respawns the player at the given position.void
WorldItem.setPositionAndRotation
(Vector3f position, Quaternion rotation) void
Npc.setRotation
(Quaternion quaternion) Sets the npc rotation.void
Player.setRotation
(Quaternion quaternion) Sets the player rotation.void
Vehicle.setRotation
(Quaternion rotation) Sets the rotation of the vehicle.void
WorldItem.setRotation
(Quaternion rotation) Sets the rotation of this item.void
Player.setSpawnPoint
(SpawnPointType spawnPoint, Vector3f position, Quaternion rotation, String name) void
Player.setSpawnPoint
(SpawnPointType spawnPoint, Vector3f position, Quaternion rotation, String name, long relatedObjectID, int chunkPosX, int chunkPosY, int chunkPosZ) -
Verwendungen von Quaternion in net.risingworld.api.objects.world
Modifizierer und TypMethodeBeschreibungConstructionElement.getRotation()
Gets the rotation of this construction element.ObjectElement.getRotation()
Gets the rotation of this object.Plant.getRotation()
Gets the rotation of this plant.Modifizierer und TypMethodeBeschreibungvoid
ConstructionElement.setRotation
(Quaternion rotation) Sets the rotation of this construction element.void
ObjectElement.setRotation
(Quaternion rotation) Sets the rotation of this object.void
Plant.setRotation
(Quaternion rotation) Sets the rotation of this plant. -
Verwendungen von Quaternion in net.risingworld.api.utils
Modifizierer und TypFeldBeschreibungstatic final Quaternion
Quaternion.IDENTITY
A quaternion representing no rotationstatic final Quaternion
Quaternion.ZERO
An "empty" quaternion.Modifizierer und TypMethodeBeschreibungQuaternion.copy()
Creates a copy of this Quaternion.Quaternion.fromAngles
(float[] angles) Calculates this quaternion from the given Euler rotation angles (pitch, yaw, roll) aka (attitude, heading, bank) aka (x, y, z).Quaternion.fromAngles
(float pitch, float yaw, float roll) Calculates this quaternion from the given Euler rotation angles (pitch, yaw, roll) aka (attitude, heading, bank) aka (x, y, z).Quaternion.fromString
(String input) Quaternion.inverse()
Gets the inverse of this quaternion as a new quaternion.Quaternion.inverseLocal()
Calculates the inverse of this quaternion and stores the result in this quaternion.Quaternion.loadIdentity()
Sets this quaternion to 0, 0, 0, 1.Quaternion.lookAt
(float directionx, float directiony, float directionz) "Looks at" a given direction, i.e the quaternion will be set based on the direction."Looks at" a given direction, i.e the quaternion will be set based on the direction."Looks at" a given direction, i.e the quaternion will be set based on the direction and an up vector.Quaternion.multLocal
(float scalar) Multiplies the quaternion by a scalar.Quaternion.multLocal
(float qx, float qy, float qz, float qw) Multiplies this quaternion by the provided values.Quaternion.multLocal
(Quaternion quaternion) Multiplies this quaternion by the provided quaternion.Quaternion.negateLocal()
Negates the values of this quaternion.Quaternion.normalize()
Gets the normalized quaternion as a new quaternion.Quaternion.normalizeLocal()
Normalizes this quaternion.Quaternion.set
(float x, float y, float z, float w) Sets the X, Y, Z and W values of this Quaternion to the provided values.Quaternion.set
(Quaternion quaternion) Sets the X, Y, Z and W values of this Quaternion to the values of the provided quaternion.Quaternion.setW
(float w) Sets the Z value of this Quaternion.Quaternion.setX
(float x) Sets the X value of this Vector3f.Quaternion.setY
(float y) Sets the Y value of this Vector3f.Quaternion.setZ
(float z) Sets the Z value of this Quaternion.Modifizierer und TypMethodeBeschreibungfloat
Quaternion.angle
(Quaternion quaternion) Gets the angle (in degrees) between this quaternion and the other quaternion.float
Quaternion.dot
(Quaternion quaternion) Gets the dot product of this quaternion with the provided quaternion.Quaternion.multLocal
(Quaternion quaternion) Multiplies this quaternion by the provided quaternion.Quaternion.set
(Quaternion quaternion) Sets the X, Y, Z and W values of this Quaternion to the values of the provided quaternion. -
Verwendungen von Quaternion in net.risingworld.api.world.batch
Modifizierer und TypMethodeBeschreibungvoid
ConstructionPlaceBatch.add
(int shape, int texture, float textureScale, int color, Vector3f worldPosition, Quaternion rotation, Vector3f scale, Vector3f surfaceOffset, Vector3f surfaceScale) void
PlantPlaceBatch.add
(int typeID, Vector3f worldPosition, Quaternion rotation, Vector3f scale) -
Verwendungen von Quaternion in net.risingworld.api.worldelements
Modifizierer und TypMethodeBeschreibungGameObject.getLocalRotation()
Gets the rotation of this object, relative to its parent.Modifizierer und TypMethodeBeschreibungvoid
GameObject.moveToLocalTransform
(Vector3f position, Quaternion rotation, float speed) Smoothly moves and rotates this object to a target local position and rotation.void
GameObject.rotateToLocalRotation
(Quaternion rotation, float speed) Smoothly rotates this object to a target local rotation.void
GameObject.setLocalRotation
(Quaternion rotation) Sets the rotation of this object, relative to its parent.void
Prefab.setLocalRotation
(String path, Quaternion rotation) Sets the rotation of the prefab or a child of this prefab, relative to its parent.Modifizierer und TypMethodeBeschreibungvoid
Prefab.readLocalRotation
(String path, Player player, Callback<Quaternion> callback) Reads the actual local rotation of the prefab (or a child of this prefab, specified by the path) from a particular player.void
GameObject.readWorldRotation
(Player player, Callback<Quaternion> callback) Reads the actual world rotation of the game object from a particular player.void
Prefab.readWorldRotation
(String path, Player player, Callback<Quaternion> callback) Reads the actual world rotation of the prefab (or a child of this prefab, specified by the path) from a particular player.