Package me.deecaad.core.transition
Class DisplayTransformTrack
java.lang.Object
me.deecaad.core.transition.DisplayTransformTrack
Combines up to three transform-component transitions (translation, scale, rotation) for one
display entity into a single schedule of
Transformation segments. Required because
FakeDisplayEntity.setTransformation replaces translation + scale + rotation atomically,
so the three transitions must be sampled at a unified tick set.
All non-null transitions must have the same durationTicks. The right-side rotation in
the emitted Transformation is always identity.
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayTransformTrack(@Nullable Transition<org.joml.Vector3f> translation, @Nullable Transition<org.joml.Vector3f> scale, @Nullable Transition<org.joml.Quaterniond> rotation) -
Method Summary
Modifier and TypeMethodDescriptionint@NotNull List<TransitionPlayback.Segment<org.bukkit.util.Transformation>> schedule()Builds the union schedule of segments across the non-null component transitions.@NotNull org.bukkit.util.TransformationvalueAt(int tick) Builds theTransformationthat should be active at the given tick.
-
Constructor Details
-
DisplayTransformTrack
public DisplayTransformTrack(@Nullable @Nullable Transition<org.joml.Vector3f> translation, @Nullable @Nullable Transition<org.joml.Vector3f> scale, @Nullable @Nullable Transition<org.joml.Quaterniond> rotation) - Parameters:
translation- Optional translation track.scale- Optional scale track.rotation- Optional rotation track (applied as the left rotation).
-
-
Method Details
-
getDurationTicks
public int getDurationTicks() -
valueAt
@NotNull public @NotNull org.bukkit.util.Transformation valueAt(int tick) Builds theTransformationthat should be active at the given tick. Useful for setting a display's initial state before scheduling segments.- Parameters:
tick- The tick to sample.- Returns:
- The non-null transformation.
-
schedule
@NotNull public @NotNull List<TransitionPlayback.Segment<org.bukkit.util.Transformation>> schedule()Builds the union schedule of segments across the non-null component transitions. Each segment's value is the combinedTransformationsampled at that segment's end tick.- Returns:
- A non-null, ascending-by-tickOffset list of segments. May be empty if there are no intervals to schedule.
-