mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 10:06:00 +00:00
1 parent
2689127787
commit
4113bcc6e9
31 files changed
+694
-206
No files matched your search
@@ -63,9 +63,9 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
|
||||
|
||||
AnimationData data = npc.display.animationData;
|
||||
if (!playingAnimation) {
|
||||
data.animation = new Animation();
|
||||
data.setAnimation(new Animation());
|
||||
data.animation.smooth = animation.smooth;
|
||||
data.animation.renderTicks = animation.renderTicks;
|
||||
data.animation.tickDuration = 50;
|
||||
data.animation.loop = 0;
|
||||
|
||||
if (this.animation.frames.size() > 0) {
|
||||
@@ -109,12 +109,8 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
|
||||
this.playingAnimation = false;
|
||||
initGui();
|
||||
} else if (data.isActive()) {
|
||||
Frame currentFrame = (Frame) data.animation.currentFrame();
|
||||
long time = mc.theWorld.getTotalWorldTime();
|
||||
if (time != prevTick) {
|
||||
if (currentFrame != null && !currentFrame.renderTicks) {
|
||||
data.animation.increaseTime();
|
||||
}
|
||||
GuiNpcLabel label = this.getLabel(94);
|
||||
if (label != null) {
|
||||
label.label += ".";
|
||||
@@ -186,7 +182,7 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
|
||||
}
|
||||
}
|
||||
this.playingAnimation = true;
|
||||
data.animation = animation;
|
||||
data.setAnimation(this.animation);
|
||||
data.animation.paused = false;
|
||||
} else if (guibutton.id == 92) {
|
||||
data.animation.paused = true;
|
||||
@@ -207,7 +203,7 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
|
||||
this.animation = new Animation();
|
||||
animation.readFromNBT(compound);
|
||||
setSelected(animation.name);
|
||||
npc.display.animationData.animation = animation;
|
||||
npc.display.animationData.setAnimation(this.animation);
|
||||
this.playingAnimation = false;
|
||||
npc.display.animationData.animation.paused = false;
|
||||
initGui();
|
||||
|
||||
Reference in new issue
Block a user