Unable to animate custom mob models

Started by Dragoona on

Topic category: Help with MCreator software

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unable to animate custom mob models
Sun, 05/24/2020 - 03:36 (edited)

I am trying to make a custom mob for my mod but i cant animate it. I am able to animate it if i use a version of the model made for 1.15 but then it cause compiling errors. When i try using the 1.14 version of the model it does not give me any options to animate it. Here is the .java file:

public class kiljaw extends EntityModel {
    private final RendererModel body;
    private final RendererModel leg0;
    private final RendererModel leg1;
    private final RendererModel leg2;
    private final RendererModel leg3;

    public kiljaw() {
        textureWidth = 64;
        textureHeight = 64;

        body = new RendererModel(this);
        body.setRotationPoint(-2.0F, 5.0F, 2.0F);
        setRotationAngle(body, 1.5708F, 0.0F, 0.0F);
        body.cubeList.add(new ModelBox(body, 0, 0, -6.0F, -8.0F, -11.0F, 16, 15, 16, 0.0F, false));
        body.cubeList.add(new ModelBox(body, 0, 41, -6.0F, -9.0F, -11.0F, 16, 1, 3, 0.0F, false));
        body.cubeList.add(new ModelBox(body, 46, 37, 6.0F, -9.0F, -8.0F, 4, 1, 4, 0.0F, false));
        body.cubeList.add(new ModelBox(body, 41, 31, -6.0F, -9.0F, -8.0F, 4, 1, 4, 0.0F, false));
        body.cubeList.add(new ModelBox(body, 0, 31, -6.0F, -9.0F, -4.0F, 16, 1, 9, 0.0F, false));

        leg0 = new RendererModel(this);
        leg0.setRotationPoint(-4.0F, 12.0F, 7.0F);
        leg0.cubeList.add(new ModelBox(leg0, 16, 45, -8.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));

        leg1 = new RendererModel(this);
        leg1.setRotationPoint(4.0F, 12.0F, 7.0F);
        leg1.cubeList.add(new ModelBox(leg1, 0, 45, 4.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F, false));

        leg2 = new RendererModel(this);
        leg2.setRotationPoint(-4.0F, 12.0F, -6.0F);
        leg2.cubeList.add(new ModelBox(leg2, 34, 41, -8.0F, 0.0F, -1.0F, 4, 12, 4, 0.0F, false));

        leg3 = new RendererModel(this);
        leg3.setRotationPoint(4.0F, 12.0F, -6.0F);
        leg3.cubeList.add(new ModelBox(leg3, 0, 0, 4.0F, 0.0F, -1.0F, 4, 12, 4, 0.0F, false));
    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        body.render(f5);
        leg0.render(f5);
        leg1.render(f5);
        leg2.render(f5);
        leg3.render(f5);
    }

    public void setRotationAngle(RendererModel modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

Edited by Dragoona on Sun, 05/24/2020 - 03:36