Closed Andre601 closed 1 year ago
Hello, I think I found the problem. It's not actually that the last step is being skipped. In your example, pause
is set to 0, which means that when the animation reaches the last step, it will wait for 0 ticks and then start the animation again. So basically, the last step is only displayed for 0 ticks. If you set the pause
to 5 (same as speed
), it will work as intended.
That's actually true now that I think about it...
Tho, I think that I'm not the only one who assumed that the speed is applied to every step and that pause would be added on top of that...
Just making sure
Reproduction
Example file:
Solution
My current guess is an issue with the
getCurrentStep
method in combination with the usage ofsteps.size() - 1
in the CustomTextAnimation class.https://github.com/DecentSoftware-eu/DecentHolograms/blob/fde9238175b9fd71e38c4fb855b9003bf5f888f3/src/main/java/eu/decentsoftware/holograms/api/animations/Animation.java#L28
https://github.com/DecentSoftware-eu/DecentHolograms/blob/fde9238175b9fd71e38c4fb855b9003bf5f888f3/src/main/java/eu/decentsoftware/holograms/api/animations/custom/CustomTextAnimation.java#L29
Perhaps the issue is related to some rounding issue?
Server Version
This server is running Paper version git-Paper-519 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 936205b) You are 2 version(s) behind Download the new version at: https://papermc.io/downloads/paper Previous version: git-Paper-514 (MC: 1.19.4)
Client Version
1.19.4 (Using Quilt Modloader and some optimization mods)
Plugin Version
2.8.1
Log
https://mclo.gs/ney3PLB