Package kr.toxicity.model.api.tracker
Class DummyTracker
java.lang.Object
kr.toxicity.model.api.tracker.Tracker
kr.toxicity.model.api.tracker.DummyTracker
- All Implemented Interfaces:
AutoCloseable
A tracker implementation that is not attached to any entity.
Dummy trackers are positioned at a fixed location in the world and can be moved manually. They are useful for static models or models controlled entirely by scripts/plugins.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from class kr.toxicity.model.api.tracker.Tracker
Tracker.BundlerSet, Tracker.CloseReason, Tracker.ScheduledPacketHandler -
Field Summary
Fields inherited from class kr.toxicity.model.api.tracker.Tracker
MINECRAFT_TICK_MULTIPLIER, modifier, pipeline, rotator, scaler, TRACKER_TICK_INTERVAL -
Constructor Summary
ConstructorsConstructorDescriptionDummyTracker(@NotNull org.bukkit.Location location, @NotNull RenderPipeline pipeline, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates a new dummy tracker. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.Locationlocation()Returns the current location of the tracker.voidlocation(@NotNull org.bukkit.Location location) Moves the model to a new location.voidspawn(@NotNull org.bukkit.entity.Player player) Spawns the model for a specific player.Methods inherited from class kr.toxicity.model.api.tracker.Tracker
animate, animate, animate, animate, animate, animate, animate, animate, animate, bone, bone, bone, bones, close, close, createHitBox, createNametag, despawn, displays, equals, forceUpdate, forRemoval, forRemoval, frame, handleCloseEvent, hashCode, height, hide, hitbox, isClosed, isHide, isScheduled, isSpawned, isSpawned, modifier, name, pause, perPlayerTick, playerCount, remove, renderer, replace, replace, replace, rotation, rotation, rotator, scaler, scaler, schedule, show, spawn, stopAnimation, stopAnimation, stopAnimation, task, tick, tick, toString, tryUpdate, update, update, update, update, viewedPlayer
-
Constructor Details
-
DummyTracker
public DummyTracker(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull RenderPipeline pipeline, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates a new dummy tracker.- Parameters:
location- the initial locationpipeline- the render pipelinemodifier- the tracker modifierpreUpdateConsumer- a consumer to run before the first update- Since:
- 1.15.2
-
-
Method Details
-
location
public void location(@NotNull @NotNull org.bukkit.Location location) Moves the model to a new location.- Parameters:
location- the new location- Since:
- 1.15.2
-
location
@NotNull public @NotNull org.bukkit.Location location()Returns the current location of the tracker. -
spawn
public void spawn(@NotNull @NotNull org.bukkit.entity.Player player) Spawns the model for a specific player.- Parameters:
player- the target player- Since:
- 1.15.2
-