How to animate custom mob models

Started by Delofon on Mon, 07/16/2018 - 10:36

Topic category: Help with modding (Java Edition)

Last seen on 13:11, 22. Feb 2019
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to animate custom mob models
Mon, 07/16/2018 - 15:09 (edited)

Before i open an issue, i want to ask forum before that. I've set everything in "Model Animation Wizard", but my mob still don't animated. Which code i must add to mob's code to animate it?

EDIT: See my reply below for the answer.

EDIT2: That thing happened with Techne.

Edited by Delofon on Mon, 07/16/2018 - 15:09
Last seen on 13:11, 22. Feb 2019
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hey? Anyone?
Mon, 07/16/2018 - 13:41

Hey? Anyone?

Last seen on 13:11, 22. Feb 2019
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Wow, again luck was on my…
Mon, 07/16/2018 - 14:35

Wow, again luck was on my side. Just copy this little code

this.head.rotateAngleY = f3 / (180F / (float)Math.PI);
this.head.rotateAngleX = f4 / (180F / (float)Math.PI);
this.leftleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;
this.rightleg.rotateAngleX = MathHelper.cos(f * 1.0F) * 1.0F * f1;
this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 2.0F * f1 * 0.5F;
this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;

into public void setRotationAngles (must be at the bottom of your mob code). Then, press the "Reformat the code and imports" button, and everything must work.

Last seen on 13:11, 22. Feb 2019
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Also if needed, add any part…
Mon, 07/16/2018 - 14:35

Also if needed, add any part of the model you have into that code.