How to animate your custom mob tutorial

Started by IGOR_LIVE96 on

Topic category: User side tutorials

Last seen on 18:16, 20. Oct 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to animate your custom mob tutorial
Sat, 03/21/2020 - 09:31 (edited)

 

Hello! My name is Igor! FOR VERSIONS 1.7.9.1.8.0 etc ... FROM MCREATOR

Today I will teach you how to animate your custom mob!

1. Create your mob! And save it in ".java" format
2. Then right-click the file and open it with a text editor (preferably Notepad ++)
3. Roll over there at the end! You'll see this code:

public void setRotationAngles (float f, float f1, float f2, float f3, float f4, float f5, entity Entity)
  {
    super.setRotationAngles (f, f1, f2, f3, f4, f5, entity);
  }

}

4. Copy the code of the site: https://pastebin.com/ksq1S6rK

5.Paste the code exactly like this:
public void setRotationAngles (float f, float f1, float f2, float f3, float f4, float f5, entity Entity)
  {
    super.setRotationAngles (f, f1, f2, f3, f4, f5 entity);
    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 + (float) Math.PI) * 2.0F * f1 * 0.5F;
  }

}

6.Replace or add parts according to your mob eg if you have horns:
  {
    super.setRotationAngles (f, f1, f2, f3, f4, f5, entity);
    this.head.rotateAngleY ​​= f3 / (180F / (float) Math.PI);
    this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
    this.righthorn.rotateAngleY ​​= f3 / (180F / (float) Math.PI);
    this.righthorn.rotateAngleX = f4 / (180F / (float) Math.PI);
    this.lefthorn.rotateAngleY ​​= f3 / (180F / (float) Math.PI);
    this.lefthorn.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 + (float) Math.PI) * 2.0F * f1 * 0.5F;
  }

}

 

7. Good! Go exploring the world of animations! Now just add mob in mod!

QUESTIONS:
My model was all wrong what happened? Make sure your body's animation points are correct to avoid mistakes!
Should I always do this before adding a template? Not that I know of, after adding animation to a mob, MCreator seems to have recognized the code and validated it for everyone!
Other questions, I'm here!

Edited by IGOR_LIVE96 on Sat, 03/21/2020 - 09:31
Last seen on 19:11, 3. Jul 2019
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I define specific…
Thu, 02/07/2019 - 17:33

How can I define specific animations as, well, specific animations. 

 

As an example, I've made a model with 2 parts for each arm and leg to have a bend. I want to have it have a walking animation, a falling animation, and an attack animation. 

If I make the animations using Blockbench (which just seems to be the best tbh since techne is dead and unsupported), can I use that and set it as those specific things? 

Last seen on 18:16, 20. Oct 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
We have not reached this…
Thu, 02/07/2019 - 17:37

We have not reached this level of animation! Like Evoker that when he attacks, he raises his arms and then .. back to normal! Even so, how nice that you are using a simpler tool (for you)!

Last seen on 18:16, 20. Oct 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
We have not reached this…
Thu, 02/07/2019 - 17:39

We have not reached this level of animation! Like Evoker that when he attacks, he raises his arms and then .. back to normal! Even so, how nice that you are using a simpler tool (for you)!

Last seen on 06:56, 28. Mar 2024
Joined Mar 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with a custom…
Sun, 04/14/2019 - 22:58

I need help with a custom scorpion model

I can't get the legs of model work suitably

¿can you help me?

Last seen on 18:16, 20. Oct 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, but lets do it by…
Sun, 04/14/2019 - 23:52

Yeah, but lets do it by Discord my nick: BlueFox#6211

Last seen on 01:49, 12. Jan 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i want to specify looped…
Thu, 07/18/2019 - 07:29

i want to specify looped animations for my human mob, its based on the very very early versions of minecraft (im talking about the pre classic versions), and i want them to play the same animation they played on pre classic (swing their arms from a side to the other), is mcreator advanced enough to do this?

Last seen on 01:49, 12. Jan 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also i dont know how to code…
Thu, 07/18/2019 - 18:48

also i dont know how to code, is there anyway you can help me

Last seen on 08:50, 22. Apr 2023
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to give an…
Thu, 11/28/2019 - 05:18

Is there a way to give an attack animation to any mobs yet?

Last seen on 15:44, 1. Apr 2023
Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help for my mob, each…
Thu, 12/26/2019 - 19:01

I need help for my mob, each arm of my mob is made up of two feet, the forearm and the arm, and I want them to move like a single foot, I don't know much about programming and I would like to know, how to join those two feet and work as one?

Last seen on 17:48, 2. Feb 2020
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi! I have a question about…
Mon, 01/06/2020 - 17:52

Hi! I have a question about Java code what U past. In part of if i see elements like 'this.head', 'this.leftarm'. My question is: are that parts as the same as i should name cubes when i create model in Techne? Im completly green in Java and i started myself witf mcreator 2 days ago. Now i have good working monster type mob with textures and behaviors and now i want add some 'live' in it. But back to my question: if i named in Techne mob's head cube as 'head123' or sth in your code should i write 'this.head123' or not? And when i past code in Java file mob will just move in game or i will can configure movement in mcreator? 

Last seen on 17:48, 2. Feb 2020
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, i think i solved my…
Mon, 01/06/2020 - 18:17

Ok, i think i solved my problem. In mcreator 2019.5 there is many option of animation without editing code in Java file. 

Last seen on 08:50, 22. Apr 2023
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Basic Children
Fri, 01/10/2020 - 06:44

Basic Children

Last seen on 23:46, 17. Dec 2021
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
HOW DOES THIS ALL WORK???  
Mon, 02/17/2020 - 17:16

HOW DOES THIS ALL WORK???

 

Last seen on 23:46, 17. Dec 2021
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
in 2020.1
Mon, 02/17/2020 - 17:18

in 2020.1