Record Class ModelElement.Cube

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelElement.Cube
Record Components:
name - the name of the cube
uuid - the UUID of the cube
from - the starting coordinate (min corner)
to - the ending coordinate (max corner)
inflate - the inflation value (size increase)
rotation - the rotation of the cube
origin - the pivot point (origin) of the cube
faces - the UV mapping for the faces
lightEmission - the light emission level (0-15)
_visibility - the visibility state (null means visible)
All Implemented Interfaces:
ModelElement
Enclosing interface:
ModelElement

public static record ModelElement.Cube(@NotNull String name, @NotNull String uuid, @Nullable Float3 from, @Nullable Float3 to, float inflate, @Nullable Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, int lightEmission, @Nullable Boolean _visibility) extends Record implements ModelElement
Represents a standard cube element.
Since:
1.15.2
  • Constructor Details

    • Cube

      public Cube(@NotNull @NotNull String name, @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, int lightEmission, @Nullable @Nullable Boolean _visibility)
      Creates an instance of a Cube record class.
      Parameters:
      name - the value for the name record component
      uuid - the value for the uuid record component
      from - the value for the from record component
      to - the value for the to record component
      inflate - the value for the inflate record component
      rotation - the value for the rotation record component
      origin - the value for the origin record component
      faces - the value for the faces record component
      lightEmission - the value for the lightEmission record component
      _visibility - the value for the _visibility record component
  • Method Details

    • type

      @NotNull public @NotNull String type()
      Description copied from interface: ModelElement
      Returns the type identifier of this element (e.g., "cube", "locator").
      Specified by:
      type in interface ModelElement
      Returns:
      the type string
    • from

      @NotNull public @NotNull Float3 from()
      Returns the starting coordinate (min corner).
      Returns:
      the from vector, or Float3.ZERO if not specified
      Since:
      1.15.2
    • to

      @NotNull public @NotNull Float3 to()
      Returns the ending coordinate (max corner).
      Returns:
      the to vector, or Float3.ZERO if not specified
      Since:
      1.15.2
    • visibility

      public boolean visibility()
      Checks if the cube is visible.
      Returns:
      true if visible, false otherwise
      Since:
      1.15.2
    • rotation

      @NotNull public @NotNull Float3 rotation()
      Returns the rotation of the cube.
      Returns:
      the rotation, or Float3.ZERO if not specified
      Since:
      1.15.2
    • lightEmission

      public int lightEmission()
      Returns the light emission level of the cube.
      Returns:
      the light emission level (0-15)
      Since:
      2.1.0
    • toBlueprint

      @NotNull public @NotNull BlueprintElement toBlueprint()
      Description copied from interface: ModelElement
      Converts this raw element into a processed BlueprintElement.
      Specified by:
      toBlueprint in interface ModelElement
      Returns:
      the blueprint element
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • uuid

      @NotNull public @NotNull String uuid()
      Returns the value of the uuid record component.
      Specified by:
      uuid in interface ModelElement
      Returns:
      the value of the uuid record component
    • inflate

      public float inflate()
      Returns the value of the inflate record component.
      Returns:
      the value of the inflate record component
    • origin

      @NotNull public @NotNull Float3 origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • faces

      @Nullable public @Nullable ModelFace faces()
      Returns the value of the faces record component.
      Returns:
      the value of the faces record component
    • _visibility

      @SerializedName("visibility") @Nullable public @Nullable Boolean _visibility()
      Returns the value of the _visibility record component.
      Returns:
      the value of the _visibility record component