mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 02:13:04 +00:00
Removed "render ticks" tick type. Instead, animations and frames can define a tick speed measured in milliseconds. Animations/frames using MC tick type will be 50ms (1000ms/20), and render ticks 20ms.
This commit is contained in:
1 parent
de909472b3
commit
799631eece
11 files changed
+97
-95
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 += ".";
|
||||
@@ -185,7 +181,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;
|
||||
@@ -206,7 +202,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