EntityTrackerRegistry

A registry of each entity's tracker

Types

Link copied to clipboard
Hitbox with mount info

Properties

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

Functions

Link copied to clipboard
@NotNull
open fun adapter(): @NotNull EntityAdapter
Gets entity's adapter
Link copied to clipboard
open fun close(): Boolean
Closes this registry
Link copied to clipboard
@ApiStatus.Internal
@NotNull
open fun create(@NotNull key: @NotNull String, @NotNull supplier: @NotNull (EntityTrackerRegistry) -> EntityTracker): @NotNull EntityTracker
Creates tracker in this registry
Link copied to clipboard
open fun despawn()
Despawns this registry to all players
Link copied to clipboard
@NotNull
open fun displays(): @NotNull Stream<ModelDisplay>
Gets all displays as stream
Link copied to clipboard
@NotNull
open fun entity(): @NotNull Entity
Gets source entity
Link copied to clipboard
@Nullable
open fun first(): @Nullable EntityTracker
Gets first tracker of this register
Link copied to clipboard
@ApiStatus.Internal
@NotNull
open fun getOrCreate(@NotNull entity: @NotNull Entity): @NotNull EntityTrackerRegistry
Gets or creates registry by entity
@ApiStatus.Internal
@NotNull
open fun getOrCreate(@NotNull key: @NotNull String, @NotNull supplier: @NotNull (EntityTrackerRegistry) -> EntityTracker): @NotNull EntityTracker
Gets or creates tracker in this registry
Link copied to clipboard
Checks this tracker has controlling passenger
Link copied to clipboard
open fun hasModelData(@NotNull entity: @NotNull Entity): Boolean
Checks this entity has model data
Link copied to clipboard
open fun hasPassenger(): Boolean
Checks this tracker has passenger
Link copied to clipboard
@NotNull
open fun hideOption(@NotNull uuid: @NotNull UUID): @NotNull EntityHideOption
Gets hide option for some player
Link copied to clipboard
open fun id(): Int
Gets entity's id
Link copied to clipboard
open fun isClosed(): Boolean
Checks this registry is closed
Link copied to clipboard
open fun isSpawned(@NotNull uuid: @NotNull UUID): Boolean
open fun isSpawned(@NotNull player: @NotNull Player): Boolean
Checks this tracker is spawned by some player
Link copied to clipboard
open fun load()
Loads entity's tracker this in this registry
open fun load(@NotNull stream: @NotNull Stream<TrackerData>)
Loads tracker data in this registry
Link copied to clipboard
@NotNull
@Unmodifiable
open fun mountedHitBox(): @NotNull @Unmodifiable Map<UUID, EntityTrackerRegistry.MountedHitBox>
Gets currently mounted hitbox
Link copied to clipboard
open fun refresh()
Refreshes this registry
Link copied to clipboard
@NotNull
@Unmodifiable
open fun registries(): @NotNull @Unmodifiable List<EntityTrackerRegistry>
Gets all registries
open fun registries(@NotNull consumer: @NotNull Consumer<EntityTrackerRegistry>)
Uses all registries
Link copied to clipboard
@Nullable
open fun registry(id: Int): @Nullable EntityTrackerRegistry
Gets registry by id
@Nullable
open fun registry(@NotNull uuid: @NotNull UUID): @Nullable EntityTrackerRegistry
Gets registry by uuid
@Nullable
open fun registry(@NotNull entity: @NotNull Entity): @Nullable EntityTrackerRegistry
Gets registry by entity
Link copied to clipboard
open fun reload()
Reloads this registry
Link copied to clipboard
open fun remove(@NotNull key: @NotNull String): Boolean
Removes some tracker in this registry
open fun remove(@NotNull player: @NotNull Player): Boolean
Removes player from this registry
Link copied to clipboard
open fun save()
Saves entity data
Link copied to clipboard
@NotNull
open fun serialize(): @NotNull JsonArray
Serializes all tracker's data
Link copied to clipboard
open fun spawn(@NotNull player: @NotNull Player): Boolean
Spawns this tracker to some player
Link copied to clipboard
open fun spawnIfNotSpawned(@NotNull player: @NotNull Player): Boolean
Spawns not spawned tracker to some player
Link copied to clipboard
@Nullable
open fun tracker(@Nullable key: @Nullable String): @Nullable EntityTracker
Gets some tracker by its name
Link copied to clipboard
@NotNull
@Unmodifiable
open fun trackers(): @NotNull @Unmodifiable Collection<EntityTracker>
Gets all trackers of this registry
Link copied to clipboard
@NotNull
open fun uuid(): @NotNull UUID
Gets entity's uuid
Link copied to clipboard
@NotNull
open fun viewedPlayer(): @NotNull Stream<PlayerChannelHandler>
Gets all viewed player as stream