Record Class TrackerData

java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.TrackerData
Record Components:
id - model id
scaler - scaler
rotator - rotator
modifier - modifier
hideOption - 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 Details

    • PARSER

      public static final com.google.gson.Gson PARSER
      Parser
  • 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 a TrackerData record class.
      Parameters:
      id - the value for the id record component
      scaler - the value for the scaler record component
      rotator - the value for the rotator record component
      modifier - the value for the modifier record component
      bodyRotator - the value for the bodyRotator record component
      hideOption - the value for the hideOption record component
      markForSpawn - the value for the markForSpawn record component
  • Method Details

    • applyAs

      public void applyAs(@NotNull @NotNull EntityTracker tracker)
    • 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

      @NotNull public @NotNull ModelScaler scaler()
      Returns the value of the scaler record component.
      Returns:
      the value of the scaler record component
    • rotator

      @NotNull public @NotNull ModelRotator rotator()
      Returns the value of the rotator record component.
      Returns:
      the value of the rotator record component
    • hideOption

      @NotNull public @NotNull EntityHideOption hideOption()
      Returns the value of the hideOption record component.
      Returns:
      the value of the hideOption record component
    • markForSpawn

      @NotNull public @NotNull Set<UUID> markForSpawn()
      Returns the value of the markForSpawn record component.
      Returns:
      the value of the markForSpawn record component
    • bodyRotator

      @NotNull public EntityBodyRotator.RotatorData bodyRotator()
      Returns the value of the bodyRotator record component.
      Returns:
      the value of the bodyRotator record component
    • toString

      @NotNull public @NotNull 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • modifier

      @NotNull public @NotNull TrackerModifier modifier()
      Returns the value of the modifier record component.
      Returns:
      the value of the modifier record component