Package kr.toxicity.model.api.tracker
Record Class TrackerData
java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.TrackerData
- Record Components:
id- model idscaler- scalerrotator- rotatormodifier- modifierhideOption- hide option
public record TrackerData(@NotNull String id, @Nullable ModelScaler scaler, @Nullable ModelRotator rotator, @NotNull TrackerModifier modifier, EntityBodyRotator.RotatorData bodyRotator, @Nullable EntityHideOption hideOption, @Nullable Set<UUID> markForSpawn)
extends Record
Tracker data
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTrackerData(@NotNull String id, @Nullable ModelScaler scaler, @Nullable ModelRotator rotator, @NotNull TrackerModifier modifier, EntityBodyRotator.RotatorData bodyRotator, @Nullable EntityHideOption hideOption, @Nullable Set<UUID> markForSpawn) Creates an instance of aTrackerDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAs(@NotNull EntityTracker tracker) Returns the value of thebodyRotatorrecord component.static @NotNull TrackerDatadeserialize(@NotNull com.google.gson.JsonElement element) Deserializes data from JSONfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull EntityHideOptionReturns the value of thehideOptionrecord component.@NotNull Stringid()Returns the value of theidrecord component.Returns the value of themarkForSpawnrecord component.@NotNull TrackerModifiermodifier()Returns the value of themodifierrecord component.@NotNull ModelRotatorrotator()Returns the value of therotatorrecord component.@NotNull ModelScalerscaler()Returns the value of thescalerrecord component.@NotNull com.google.gson.JsonElementSerializes data as JSON@NotNull StringtoString()Returns a string representation of this record class.
-
Field Details
-
PARSER
public static final com.google.gson.Gson PARSERParser
-
-
Constructor Details
-
TrackerData
public TrackerData(@NotNull @NotNull String id, @Nullable @Nullable ModelScaler scaler, @Nullable @Nullable ModelRotator rotator, @NotNull @NotNull TrackerModifier modifier, @Nullable EntityBodyRotator.RotatorData bodyRotator, @Nullable @Nullable EntityHideOption hideOption, @Nullable @Nullable Set<UUID> markForSpawn) Creates an instance of aTrackerDatarecord class.- Parameters:
id- the value for theidrecord componentscaler- the value for thescalerrecord componentrotator- the value for therotatorrecord componentmodifier- the value for themodifierrecord componentbodyRotator- the value for thebodyRotatorrecord componenthideOption- the value for thehideOptionrecord componentmarkForSpawn- the value for themarkForSpawnrecord component
-
-
Method Details
-
applyAs
-
serialize
@NotNull public @NotNull com.google.gson.JsonElement serialize()Serializes data as JSON- Returns:
- JSON element
-
deserialize
@NotNull public static @NotNull TrackerData deserialize(@NotNull @NotNull com.google.gson.JsonElement element) Deserializes data from JSON- Parameters:
element- JSON element- Returns:
- tracker data
-
scaler
Returns the value of thescalerrecord component.- Returns:
- the value of the
scalerrecord component
-
rotator
Returns the value of therotatorrecord component.- Returns:
- the value of the
rotatorrecord component
-
hideOption
Returns the value of thehideOptionrecord component.- Returns:
- the value of the
hideOptionrecord component
-
markForSpawn
Returns the value of themarkForSpawnrecord component.- Returns:
- the value of the
markForSpawnrecord component
-
bodyRotator
Returns the value of thebodyRotatorrecord component.- Returns:
- the value of the
bodyRotatorrecord component
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-