Class TransformTree

java.lang.Object
me.deecaad.core.tick.TransformTree
All Implemented Interfaces:
Tickable

public final class TransformTree extends Object implements Tickable
Adapter that drives a TransformLike tree once per tick by walking it via Transform.tick(). Register one with a TickManager for trees containing animated transforms (e.g. an entity-bound root or per-tick computed nodes).
  • Constructor Details

    • TransformTree

      public TransformTree(@NotNull @NotNull TransformLike root, @NotNull @NotNull org.bukkit.Location region)
      Parameters:
      root - The non-null root of the tree to tick.
      region - The non-null location used to pick a region (Folia only); cloned defensively.
  • Method Details

    • stop

      public void stop()
      Stops this tree. The next tick will return true and the TickManager will remove it.
    • tick

      public boolean tick()
      Description copied from interface: Tickable
      Performs one tick of work. Return true when finished; the manager will cancel and call Tickable.remove().
      Specified by:
      tick in interface Tickable
      Returns:
      true to stop ticking.
    • getTickLocation

      @NotNull public @NotNull org.bukkit.Location getTickLocation()
      Description copied from interface: Tickable
      The location used by TickManager implementations to choose a region for scheduling. Must return non-null on Folia.
      Specified by:
      getTickLocation in interface Tickable
      Returns:
      The location, or null if region-agnostic (non-Folia only).