mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 15:45:10 +00:00
Fixed animations not ticking correctly sometimes.
This commit is contained in:
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");
|
||||
|
||||
Reference in new issue
Block a user