Package kr.toxicity.model.api.data.raw
Record Class ModelGroup
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelGroup
- Record Components:
name- the name of the groupuuid- the unique identifier of the grouporigin- the pivot point (origin) of the grouprotation- the rotation of the grouplightEmission- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of the_visibilityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelightEmissionrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Float3origin()Returns the origin (pivot point) of the group.@NotNull Float3rotation()Returns the rotation of the group.final StringtoString()Returns a string representation of this record class.@NotNull Stringuuid()Returns the value of theuuidrecord component.booleanChecks if the group is visible.
-
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 aModelGrouprecord class.- Parameters:
name- the value for thenamerecord componentuuid- the value for theuuidrecord componentorigin- the value for theoriginrecord componentrotation- the value for therotationrecord componentlightEmission- the value for thelightEmissionrecord component_visibility- the value for the_visibilityrecord component
-
-
Method Details
-
origin
Returns the origin (pivot point) of the group.- Returns:
- the origin, or
Float3.ZEROif not specified - Since:
- 1.15.2
-
rotation
Returns the rotation of the group.- Returns:
- the rotation, or
Float3.ZEROif 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
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
-
lightEmission
@SerializedName("light_emission") public int lightEmission()Returns the value of thelightEmissionrecord component.- Returns:
- the value of the
lightEmissionrecord component
-
_visibility
Returns the value of the_visibilityrecord component.- Returns:
- the value of the
_visibilityrecord component
-