Package kr.toxicity.model.api.data.raw
Record Class ModelElement
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelElement
- Record Components:
name- nametype- typeuuid- cube's uuidfrom- min-positionto- max-positioninflate- inflaterotation- rotationorigin- originfaces- uv_visibility- visibility
@Internal
public record ModelElement(@NotNull String name, @Nullable ModelElement.Type type, @NotNull String uuid, @Nullable Float3 from, @Nullable Float3 to, float inflate, @Nullable Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, @Nullable Boolean _visibility)
extends Record
A raw model's element (cube).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionModelElement(@NotNull String name, @Nullable ModelElement.Type type, @NotNull String uuid, @Nullable Float3 from, @Nullable Float3 to, float inflate, @Nullable Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, @Nullable Boolean _visibility) Creates an instance of aModelElementrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of the_visibilityrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable ModelFacefaces()Returns the value of thefacesrecord component.@NotNull Float3from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.booleanChecks this model has texturefloatinflate()Returns the value of theinflaterecord component.booleanChecks this element is supported in the Minecraft client.floatmax()Gets max length of this cube@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Float3origin()Returns the value of theoriginrecord component.@NotNull Float3rotation()Returns the value of therotationrecord component.@NotNull Float3to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.@NotNull ModelElement.Typetype()Returns the value of thetyperecord component.@NotNull Stringuuid()Returns the value of theuuidrecord component.boolean
-
Constructor Details
-
ModelElement
public ModelElement(@NotNull @NotNull String name, @Nullable @Nullable ModelElement.Type type, @NotNull @NotNull String uuid, @Nullable @Nullable Float3 from, @Nullable @Nullable Float3 to, float inflate, @Nullable @Nullable Float3 rotation, @NotNull @NotNull Float3 origin, @Nullable @Nullable ModelFace faces, @Nullable @Nullable Boolean _visibility) Creates an instance of aModelElementrecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentuuid- the value for theuuidrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord componentinflate- the value for theinflaterecord componentrotation- the value for therotationrecord componentorigin- the value for theoriginrecord componentfaces- the value for thefacesrecord component_visibility- the value for the_visibilityrecord component
-
-
Method Details
-
max
public float max()Gets max length of this cube- Returns:
- cube length
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
visibility
public boolean visibility() -
rotation
Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
hasTexture
public boolean hasTexture()Checks this model has texture- Returns:
- model has texture
-
isSupported
public boolean isSupported()Checks this element is supported in the Minecraft client.- Returns:
- supported
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
inflate
public float inflate()Returns the value of theinflaterecord component.- Returns:
- the value of the
inflaterecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
faces
Returns the value of thefacesrecord component.- Returns:
- the value of the
facesrecord component
-
_visibility
Returns the value of the_visibilityrecord component.- Returns:
- the value of the
_visibilityrecord component
-