PlayerTracker

Player tracker

Constructors

Link copied to clipboard
@ApiStatus.Internal
constructor(@NotNull registry: @NotNull EntityTrackerRegistry, @NotNull instance: @NotNull RenderPipeline, @NotNull modifier: @NotNull TrackerModifier)
Creates player tracker

Properties

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

Functions

Link copied to clipboard
open fun animate(@NotNull animation: @NotNull String): Boolean
open fun animate(@NotNull animation: @NotNull String, modifier: AnimationModifier): Boolean
open fun animate(@NotNull animation: @NotNull String, modifier: AnimationModifier, removeTask: Runnable): Boolean
open fun animate(@NotNull filter: @NotNull Predicate<RenderedBone>, @NotNull animation: @NotNull String, modifier: AnimationModifier, removeTask: Runnable): Boolean
Players this animation by once
Link copied to clipboard
@Nullable
open fun bone(@NotNull name: @NotNull String): @Nullable RenderedBone
@Nullable
open fun bone(@NotNull predicate: @NotNull Predicate<RenderedBone>): @Nullable RenderedBone
@Nullable
open fun bone(@NotNull name: @NotNull BoneName): @Nullable RenderedBone
Gets bone by bone's name
Link copied to clipboard
@NotNull
open fun bones(): @NotNull List<RenderedBone>
Gets all bones
Link copied to clipboard
open fun brightness(@NotNull predicate: @NotNull BonePredicate, block: Int, sky: Int): Boolean
Sets brightness of some model part
Link copied to clipboard
abstract fun close()
open fun close()
Link copied to clipboard
open fun createHitBox(@NotNull predicate: @NotNull Predicate<RenderedBone>, @NotNull listener: @NotNull HitBoxListener)
Creates hit-box
Link copied to clipboard
open fun damageTint()
Applies damage tint
Link copied to clipboard
open fun damageTintValue(): Int
Gets damage tint value
open fun damageTintValue(tint: Int)
Sets damage tint value
Link copied to clipboard
open fun despawn()
Despawns this tracker to all players
Link copied to clipboard
@NotNull
open fun displays(): @NotNull Stream<ModelDisplay>
Gets all model displays
Link copied to clipboard
open fun enchant(@NotNull predicate: @NotNull BonePredicate, enchant: Boolean): Boolean
Sets enchantment of some model part
Link copied to clipboard
open fun forceUpdate(force: Boolean): Boolean
Forces packet update.
Link copied to clipboard
@ApiStatus.Internal
open fun forRemoval(): Boolean
Checks this tracker is for removal
@ApiStatus.Internal
open fun forRemoval(removal: Boolean)
Marks future will remove this tracker
Link copied to clipboard
open fun frame(@NotNull consumer: @NotNull BiConsumer<Tracker, PacketBundler>)
Runs consumer on frame.
Link copied to clipboard
open fun glow(@NotNull predicate: @NotNull BonePredicate, glow: Boolean, glowColor: Int): Boolean
Sets glow of some model part
Link copied to clipboard
open fun handleCloseEvent(@NotNull consumer: @NotNull Consumer<Tracker>)
Link copied to clipboard
open fun height(): Double
Gets tracker model's height
Link copied to clipboard
open fun hide(@NotNull player: @NotNull Player): Boolean
Hides this tracker to some player
Link copied to clipboard
open fun isClosed(): Boolean
Checks this tracker is closed
Link copied to clipboard
open fun isHide(@NotNull player: @NotNull Player): Boolean
Checks this player is marked as hide
Link copied to clipboard
Gets whether this model is playing single animation.
Link copied to clipboard
open fun itemStack(@NotNull predicate: @NotNull BonePredicate, @NotNull itemStack: @NotNull TransformedItemStack): Boolean
Sets item of some model part
Link copied to clipboard
@NotNull
open fun location(): @NotNull Location
Gets location of a model.
Link copied to clipboard
@NotNull
open fun modifier(): @NotNull TrackerModifier
Link copied to clipboard
open fun moveDuration(duration: Int)
Sets move duration of this model.
Link copied to clipboard
@NotNull
open fun name(): @NotNull String
Gets tracker name
Link copied to clipboard
open fun playerCount(): Int
Gets number of viewed players.
Link copied to clipboard
@ApiStatus.Internal
open fun refresh()
Refresh this tracker
Link copied to clipboard
@NotNull
open fun registry(): @NotNull EntityTrackerRegistry
Gets registry.
Link copied to clipboard
open fun remove(@NotNull player: @NotNull Player): Boolean
Removes model from player
Link copied to clipboard
@NotNull
open fun renderer(): @NotNull ModelRenderer
Gets the renderer of this tracker
Link copied to clipboard
open fun replace(@NotNull target: @NotNull String, @NotNull animation: @NotNull String, @NotNull modifier: @NotNull AnimationModifier): Boolean
open fun replace(@NotNull filter: @NotNull Predicate<RenderedBone>, @NotNull target: @NotNull String, @NotNull animation: @NotNull String, @NotNull modifier: @NotNull AnimationModifier): Boolean
Replaces some animation by loop
Link copied to clipboard
@NotNull
fun rotation(): @NotNull ModelRotation
Gets model rotation.
fun rotation(@NotNull newRotator: @NotNull ModelRotator)
Link copied to clipboard
open fun schedule(period: Long, @NotNull consumer: @NotNull BiConsumer<Tracker, PacketBundler>)
Schedules some task.
Link copied to clipboard
open fun show(@NotNull player: @NotNull Player): Boolean
Shows this tracker to some player
Link copied to clipboard
@NotNull
open fun sourceEntity(): @NotNull Player
Gets source entity
Link copied to clipboard
open fun stopAnimation(@NotNull animation: @NotNull String)
open fun stopAnimation(@NotNull filter: @NotNull Predicate<RenderedBone>, @NotNull animation: @NotNull String)
Stops some animation
Link copied to clipboard
open fun tick(@NotNull consumer: @NotNull BiConsumer<Tracker, PacketBundler>)
open fun tick(tick: Long, @NotNull consumer: @NotNull BiConsumer<Tracker, PacketBundler>)
Runs consumer on tick.
Link copied to clipboard
open fun tint(rgb: Int)
open fun tint(@NotNull predicate: @NotNull BonePredicate, rgb: Int)
Toggles red tint of a model.
Link copied to clipboard
open fun togglePart(@NotNull predicate: @NotNull BonePredicate, toggle: Boolean): Boolean
Toggles some part
Link copied to clipboard
@Nullable
open fun tracker(@NotNull uuid: @NotNull UUID): @Nullable EntityTracker
Gets tracker
@Nullable
open fun tracker(@NotNull entity: @NotNull Entity): @Nullable EntityTracker
Get or creates tracker
Link copied to clipboard
open fun updateBaseEntity()
Syncs this tracker to base entity's data.
Link copied to clipboard
open fun updateItem(@NotNull predicate: @NotNull BonePredicate): Boolean
Updates item
Link copied to clipboard
@NotNull
open fun uuid(): @NotNull UUID
Gets uuid of a model.
Link copied to clipboard
@NotNull
open fun viewedPlayer(): @NotNull Stream<Player>
Gets viewed players.
Link copied to clipboard
@NotNull
open fun world(): @NotNull UUID
Gets world uuid in tracker