Fix animation speed

This commit is contained in:
filoghost 2021-07-18 16:25:16 +02:00
parent bbc08034f1
commit c22f01c017

View File

@ -84,7 +84,7 @@ public class AnimationRegistry implements PlaceholderFactory {
lines.set(i, DisplayFormat.apply(lines.get(i))); lines.set(i, DisplayFormat.apply(lines.get(i)));
} }
int refreshIntervalTicks = Math.min((int) (speed * 20.0), 1); int refreshIntervalTicks = Math.max((int) (speed * 20.0), 1);
animationsByFilename.put(fileName, new AnimationPlaceholder(refreshIntervalTicks, lines)); animationsByFilename.put(fileName, new AnimationPlaceholder(refreshIntervalTicks, lines));
DebugLogger.info("Successfully loaded animation \"" + fileName + "\", speed = " + speed + "."); DebugLogger.info("Successfully loaded animation \"" + fileName + "\", speed = " + speed + ".");