Package me.deecaad.core.tick
Class TransformTree
java.lang.Object
me.deecaad.core.tick.TransformTree
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionTransformTree(@NotNull TransformLike root, @NotNull org.bukkit.Location region) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.LocationThe location used byTickManagerimplementations to choose a region for scheduling.voidstop()Stops this tree.booleantick()Performs one tick of work.
-
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 returntrueand theTickManagerwill remove it. -
tick
public boolean tick()Description copied from interface:TickablePerforms one tick of work. Returntruewhen finished; the manager will cancel and callTickable.remove(). -
getTickLocation
@NotNull public @NotNull org.bukkit.Location getTickLocation()Description copied from interface:TickableThe location used byTickManagerimplementations to choose a region for scheduling. Must return non-null on Folia.- Specified by:
getTickLocationin interfaceTickable- Returns:
- The location, or
nullif region-agnostic (non-Folia only).
-