Fixed animations not ticking correctly sometimes.

This commit is contained in:
luisc committed 2024-04-05 13:14:37 -05:00
1 parent a07a33c068
commit ae2edfd79f
3 files changed
+55 -37

No files matched your search

@@ -179,6 +179,14 @@ public class Animation implements IAnimation {
id = newID;
}
public long getTotalTime() {
long time = 0;
for (Frame frame : this.frames) {
time += (long) frame.duration * (frame.customized ? frame.tickDuration : this.tickDuration);
}
return time;
}
public void readFromNBT(NBTTagCompound compound){
if(compound.hasKey("ID")){
id = compound.getInteger("ID");