LittleOne Posted June 23, 2018 Posted June 23, 2018 (edited) Hello, I'm trying to animate my model that has taken the place of the main model for renderplayer. And as usual, where I am learning to mod, trouble follows. In this test, I've created a simple animation using LLibrary ModelAnimator. Specifically, using keyframes. I attempted the walk() method, however, it does the same thing. Nothing happens, and I know I'm at fault. I used the eclipse debugger and it showed that the method animate() in render has no return value. I'm not sure this is the right place for this inquiry. If it isn't then I will be more than willing to change over to another support forum. Here's what I have. @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { EntityTwoPlayer twoplayer = (EntityTwoPlayer) entity; animate(twoplayer, f, f1, f2, f3, f4, f5); GlStateManager.pushMatrix(); GlStateManager.translate(this.Head.offsetX, this.Head.offsetY, this.Head.offsetZ); GlStateManager.translate(this.Head.rotationPointX * f5, this.Head.rotationPointY * f5, this.Head.rotationPointZ * f5); GlStateManager.scale(0.68D, 0.81D, 0.81D); GlStateManager.translate(-this.Head.offsetX, -this.Head.offsetY, -this.Head.offsetZ); GlStateManager.translate(-this.Head.rotationPointX * f5, -this.Head.rotationPointY * f5, -this.Head.rotationPointZ * f5); this.Head.render(f5); GlStateManager.popMatrix(); } /** * This is a helper function from Tabula to set the rotation of model parts */ @Override public void setRotationAngles(TabulaModel model, EntityTwoPlayer entity, float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); resetToDefaultPose(); } public void animate(IAnimatedEntity entity, float f, float f1, float f2, float f3, float f4, float f5) { EntityTwoPlayer twoplayer = (EntityTwoPlayer) entity; animator.update(twoplayer); setRotationAngles(f5, f, f1, f2, f3, f4, twoplayer); float frame = twoplayer.ticksExisted + LLibrary.PROXY.getPartialTicks(); if (twoplayer.getAnimation() == EntityTwoPlayer.WALK_ANIMATION) { animator.setAnimation(EntityTwoPlayer.WALK_ANIMATION); if(twoplayer.isSprinting()) { animator.startKeyframe(8); animator.rotate(Thigh1, 15.5f, 0, 0); animator.endKeyframe(); animator.setStaticKeyframe(2); animator.startKeyframe(8); animator.rotate(Thigh1, -10f, 0, 0); animator.endKeyframe(); animator.setStaticKeyframe(2); animator.resetKeyframe(10); } } } Any help is greatly appreciated. Edited June 23, 2018 by LittleOne Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.