Made tick duration return the correct value for animating.

This commit is contained in:
Luis C.M committed 2024-03-24 03:51:36 -05:00
1 parent b52b76128c
commit d1ca49fc3b
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -49,7 +49,8 @@ public class CommonProxy implements IGuiHandler {
HashSet<Animation> playingAnimations = CustomNpcs.proxy.hasClient() ? clientPlayingAnimations : serverPlayingAnimations;
for (int i = 0; i < animationTimer.elapsedTicks; ++i) {
for (Animation animation : playingAnimations) {
if (animation.parent.isActive() && totalTicks % animation.currentFrame().tickDuration() == 0) {
int tickDuration = animation.currentFrame().tickDuration();
if (animation.parent.isActive() && totalTicks % tickDuration == 0) {
animation.increaseTime();
}
}