TrackerData

Represents the persistent data state of a tracker.

This record holds configuration and state information such as model ID, scaling, rotation, and visibility options, which can be serialized to JSON.

Since

1.15.2

Parameters

id

the model ID

scaler

the model scaler

rotator

the model rotator

modifier

the tracker modifier

bodyRotator

the body rotation data

hideOption

the entity hide options

markForSpawn

the set of player UUIDs marked for spawning

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val PARSER: Gson
The GSON parser for serializing and deserializing tracker data.

Functions

Link copied to clipboard
open fun applyAs(@NotNull tracker: @NotNull EntityTracker)
Applies this data to an existing entity tracker.
Link copied to clipboard
@NotNull
open fun bodyRotator(): @NotNull EntityBodyRotator.RotatorData
Returns the body rotation data, or default body rotation data if not specified.
Link copied to clipboard
@NotNull
open fun deserialize(@NotNull element: @NotNull JsonElement): @NotNull TrackerData
Deserializes tracker data from a JSON element.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@NotNull
open fun hideOption(): @NotNull EntityHideOption
Returns the entity hide option, or the default hide option if not specified.
Link copied to clipboard
@NotNull
open fun markForSpawn(): @NotNull Set<UUID>
Returns the set of player UUIDs marked for spawning, or an empty set if not specified.
Link copied to clipboard
@NotNull
open fun rotator(): @NotNull ModelRotator
Returns the model rotator, or a default YAW rotator if not specified.
Link copied to clipboard
@NotNull
open fun scaler(): @NotNull ModelScaler
Returns the model scaler, or a default entity scaler if not specified.
Link copied to clipboard
@NotNull
open fun serialize(): @NotNull JsonElement
Serializes this data to a JSON element.
Link copied to clipboard
@NotNull
open fun toString(): @NotNull String
Serializes this TrackerData object to a JSON string.