Class DummyTracker

java.lang.Object
kr.toxicity.model.api.tracker.Tracker
kr.toxicity.model.api.tracker.DummyTracker
All Implemented Interfaces:
AutoCloseable

public final class DummyTracker extends Tracker
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/mods.

Since:
1.15.2
  • Constructor Details

    • DummyTracker

      public DummyTracker(@NotNull @NotNull PlatformLocation location, @NotNull @NotNull RenderPipeline pipeline, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer)
      Creates a new dummy tracker.
      Parameters:
      location - the initial location
      pipeline - the render pipeline
      modifier - the tracker modifier
      preUpdateConsumer - a consumer to run before the first update
      Since:
      1.15.2
  • Method Details

    • location

      public void location(@NotNull @NotNull PlatformLocation location)
      Moves the model to a new location.
      Parameters:
      location - the new location
      Since:
      1.15.2
    • location

      @NotNull public @NotNull PlatformLocation location()
      Returns the current location of the tracker.
      Specified by:
      location in class Tracker
      Returns:
      the location
      Since:
      1.15.2
    • spawn

      public void spawn(@NotNull @NotNull PlatformPlayer player)
      Spawns the model for a specific player.
      Parameters:
      player - the target player
      Since:
      1.15.2