mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 00:17:27 +00:00
Made tick duration return the correct value for animating.
This commit is contained in:
1 parent
b52b76128c
commit
d1ca49fc3b
2 files changed
+3
-2
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Frame implements IFrame {
|
||||
}
|
||||
|
||||
public int tickDuration() {
|
||||
return this.tickDuration;
|
||||
return !this.customized && this.parent != null ? this.parent.tickDuration : this.tickDuration;
|
||||
}
|
||||
|
||||
public IFrame setTickDuration(int tickDuration) {
|
||||
|
||||
Reference in new issue
Block a user