Tracker

abstract class Tracker : AutoCloseable

Tracker of a model.

Inheritors

Constructors

Link copied to clipboard
constructor(@NotNull instance: RenderInstance, @NotNull modifier: TrackerModifier)
Creates tracker

Properties

Link copied to clipboard
val TRACKING_ID: NamespacedKey
Tracker's namespace.

Functions

Link copied to clipboard
open fun animateLoop(@NotNull animation: String): Boolean
open fun animateLoop(@NotNull animation: String, modifier: AnimationModifier): Boolean
open fun animateLoop(@NotNull animation: String, modifier: AnimationModifier, removeTask: Runnable): Boolean
open fun animateLoop(@NotNull filter: Predicate<RenderedBone>, @NotNull animation: String, modifier: AnimationModifier, removeTask: Runnable): Boolean
Players this animation by loop
Link copied to clipboard
open fun animateSingle(@NotNull animation: String): Boolean
open fun animateSingle(@NotNull animation: String, modifier: AnimationModifier): Boolean
open fun animateSingle(@NotNull animation: String, modifier: AnimationModifier, removeTask: Runnable): Boolean
open fun animateSingle(@NotNull filter: Predicate<RenderedBone>, @NotNull animation: String, modifier: AnimationModifier, removeTask: Runnable): Boolean
Players this animation by once
Link copied to clipboard
@Nullable
open fun bone(@NotNull name: String): RenderedBone
@Nullable
open fun bone(@NotNull predicate: Predicate<RenderedBone>): RenderedBone
@Nullable
open fun bone(@NotNull name: BoneName): RenderedBone
Gets bone by bone's name
Link copied to clipboard
@NotNull
open fun bones(): List<RenderedBone>
Gets all bones
Link copied to clipboard
open fun brightness(@NotNull predicate: BonePredicate, block: Int, sky: Int): Boolean
Sets brightness of some model part
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun despawn()
Despawns this tracker to all players
Link copied to clipboard
@NotNull
open fun displays(): List<ModelDisplay>
Gets all model displays
Link copied to clipboard
open fun enchant(@NotNull predicate: BonePredicate, enchant: Boolean): Boolean
Sets enchantment of some model part
Link copied to clipboard
open fun forceUpdate(force: Boolean)
Forces packet update.
Link copied to clipboard
open fun frame(@NotNull consumer: BiConsumer<Tracker, PacketBundler>)
Runs consumer on frame.
Link copied to clipboard
open fun glow(@NotNull predicate: BonePredicate, glow: Boolean, glowColor: Int): Boolean
Sets glow of some model part
Link copied to clipboard
open fun height(): Double
Gets tracker model's height
Link copied to clipboard
open fun isClosed(): Boolean
Checks this tracker is closed
Link copied to clipboard
Gets whether this model is playing single animation.
Link copied to clipboard
open fun itemStack(@NotNull predicate: BonePredicate, @NotNull itemStack: TransformedItemStack): Boolean
Sets item of some model part
Link copied to clipboard
@NotNull
abstract fun location(): Location
Gets location of a model.
Link copied to clipboard
@NotNull
open fun modifier(): TrackerModifier
Link copied to clipboard
@NotNull
open fun name(): String
Gets tracker name
Link copied to clipboard
open fun playerCount(): Int
Gets number of viewed players.
Link copied to clipboard
open fun remove(@NotNull player: Player): Boolean
Removes model from player
Link copied to clipboard
open fun replaceLoop(@NotNull target: String, @NotNull animation: String): Boolean
open fun replaceLoop(@NotNull filter: Predicate<RenderedBone>, @NotNull target: String, @NotNull animation: String): Boolean
Replaces some animation by loop
Link copied to clipboard
open fun replaceSingle(@NotNull target: String, @NotNull animation: String): Boolean
open fun replaceSingle(@NotNull filter: Predicate<RenderedBone>, @NotNull target: String, @NotNull animation: String): Boolean
Replaces some animation by once
Link copied to clipboard
@NotNull
fun rotation(): ModelRotation
Gets model rotation.
fun rotation(@NotNull rotationSupplier: Supplier<ModelRotation>)
Link copied to clipboard
open fun schedule(period: Long, @NotNull consumer: BiConsumer<Tracker, PacketBundler>)
Schedules some task.
Link copied to clipboard
open fun stopAnimation(@NotNull animation: String)
open fun stopAnimation(@NotNull filter: Predicate<RenderedBone>, @NotNull animation: String)
Stops some animation
Link copied to clipboard
open fun tick(@NotNull consumer: BiConsumer<Tracker, PacketBundler>)
Runs consumer on tick.
Link copied to clipboard
open fun tint(rgb: Int)
open fun tint(@NotNull predicate: BonePredicate, rgb: Int)
Toggles red tint of a model.
Link copied to clipboard
open fun togglePart(@NotNull predicate: BonePredicate, toggle: Boolean): Boolean
Toggles some part
Link copied to clipboard
@NotNull
abstract fun uuid(): UUID
Gets uuid of a model.
Link copied to clipboard
@NotNull
open fun viewedPlayer(): Stream<Player>
Gets viewed players.