Package kr.toxicity.model.api.data.raw
Record Class Float3
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.Float3
- Record Components:
x- xy- yz- z
A three float value (origin, rotation)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Float3Converts zxy euler to xyz euler (Minecraft)@NotNull Float3div(float value) Divides floats.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull Float3invertXZ()Inverts XZ@NotNull Float3Subtracts other floats.@NotNull Float3Adds other floats.@NotNull Float3rotate(@NotNull org.joml.Quaternionf quaternionf) Rotates this float@NotNull Float3times(float value) Multiplies floats.@NotNull Float3Converts item model scale to block scale@NotNull com.google.gson.JsonArraytoJson()Converts floats to JSON array.@NotNull StringtoString()Returns a string representation of this record class.@NotNull org.joml.Vector3ftoVector()Converts floats to vector.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.floatz()Returns the value of thezrecord component.
-
Field Details
-
CENTER
Center -
ZERO
Zero -
PARSER
Parser
-
-
Constructor Details
-
Float3
public Float3(float value) Creates floats- Parameters:
value- scala
-
Float3
public Float3(float x, float y, float z) Creates an instance of aFloat3record class.
-
-
Method Details
-
plus
Adds other floats.- Parameters:
other- other floats- Returns:
- new floats
-
convertToMinecraftDegree
Converts zxy euler to xyz euler (Minecraft)- Returns:
- new float
-
rotate
Rotates this float- Parameters:
quaternionf- rotation- Returns:
- new float
-
minus
Subtracts other floats.- Parameters:
other- other floats- Returns:
- new floats
-
toBlockScale
Converts item model scale to block scale- Returns:
- block
-
times
Multiplies floats.- Parameters:
value- multiplier- Returns:
- new floats
-
div
Divides floats.- Parameters:
value- multiplier- Returns:
- new floats
-
invertXZ
Inverts XZ- Returns:
- new floats
-
toJson
@NotNull public @NotNull com.google.gson.JsonArray toJson()Converts floats to JSON array.- Returns:
- json array
-
toVector
@NotNull public @NotNull org.joml.Vector3f toVector()Converts floats to vector.- Returns:
- vector
-
hashCode
public 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. All components in this record class are compared with '=='. -
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. -
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public float z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-