How to animate custom mob models

Started by Delofon on

Topic category: Help with Minecraft modding (Java Edition)

Active 6 years ago
Joined Nov 2015
Points:
764

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 52
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
Active 6 years ago
Joined Nov 2015
Points:
764

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 52
Hey? Anyone?
Mon, 07/16/2018 - 13:41

Hey? Anyone?

Active 6 years ago
Joined Nov 2015
Points:
764

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 52
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.

Active 6 years ago
Joined Nov 2015
Points:
764

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 52
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.