Record Class SkyLayerDefinition.Rotation
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.sky.SkyLayerDefinition.Rotation
- Record Components:
axis- the axis, in world space;[0, 1, 0]spins around the zenith,[0, 0, 1]follows the path of vanilla's sunspeed- degrees per unit of the clock (per second, per day, or per degree of vanilla's angle)
- Enclosing class:
SkyLayerDefinition
public static record SkyLayerDefinition.Rotation(org.joml.Vector3fc axis, float speed, SkyClock clock)
extends Record
Turns the layer around an axis as its clock moves.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SkyLayerDefinition.Rotation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3fcaxis()Returns the value of theaxisrecord component.clock()Returns the value of theclockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.static SkyLayerDefinition.RotationwithMoon()Follows vanilla's moon.static SkyLayerDefinition.RotationFollows vanilla's stars.static SkyLayerDefinition.RotationwithSun()Follows vanilla's sun, rising in the east: for a sprite, or a sky that turns with the day.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Method Details
-
withSun
Follows vanilla's sun, rising in the east: for a sprite, or a sky that turns with the day. -
withMoon
Follows vanilla's moon. -
withStars
Follows vanilla's stars. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
axis
public org.joml.Vector3fc axis()Returns the value of theaxisrecord component.- Returns:
- the value of the
axisrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
clock
Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-