Record Class ModelGroup

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelGroup
Record Components:
name - the name of the group
uuid - the unique identifier of the group
origin - the pivot point (origin) of the group
rotation - the rotation of the group
lightEmission - the light emission level (0-15)
_visibility - the visibility state of the group (null means visible)

public record ModelGroup(@NotNull String name, @NotNull String uuid, @Nullable Float3 origin, @Nullable Float3 rotation, int lightEmission, @Nullable Boolean _visibility) extends Record
Represents a group definition in the raw model data.

Groups are used to organize elements and other groups hierarchically. This record corresponds to the group structure found in newer BlockBench versions (>= 5.0.0).

Since:
1.15.2
  • Constructor Details

    • ModelGroup

      public ModelGroup(@NotNull @NotNull String name, @NotNull @NotNull String uuid, @Nullable @Nullable Float3 origin, @Nullable @Nullable Float3 rotation, int lightEmission, @Nullable @Nullable Boolean _visibility)
      Creates an instance of a ModelGroup record class.
      Parameters:
      name - the value for the name record component
      uuid - the value for the uuid record component
      origin - the value for the origin record component
      rotation - the value for the rotation record component
      lightEmission - the value for the lightEmission record component
      _visibility - the value for the _visibility record component
  • Method Details

    • origin

      @NotNull public @NotNull Float3 origin()
      Returns the origin (pivot point) of the group.
      Returns:
      the origin, or Float3.ZERO if not specified
      Since:
      1.15.2
    • rotation

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

      public boolean visibility()
      Checks if the group is visible.
      Returns:
      true if visible, false otherwise
      Since:
      1.15.2
    • 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.
      Returns:
      the value of the uuid record component
    • lightEmission

      @SerializedName("light_emission") public int lightEmission()
      Returns the value of the lightEmission record component.
      Returns:
      the value of the lightEmission record component
    • _visibility

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