Animations help

Started by UnderWaves on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Jan 2019
Points:
886

User statistics:

  • Modifications: 5
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 200
Animations help

Heelo everyone.
I'm trying to create a mob made of two rotating parts, can someone teach me how to make it rotate please?

I believe this was asked…
Sun, 02/10/2019 - 19:04

I believe this was asked before, you can use search existing topics on animations.

Active 4 years ago
Joined Jan 2019
Points:
886

User statistics:

  • Modifications: 5
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 200
okay, thank you.
Tue, 02/12/2019 - 14:07

okay, thank you.

Active 5 months ago
Joined Apr 2014
Points:
1223

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 656
This code forces specific…
Thu, 02/14/2019 - 13:24

This code forces specific part of your mob to do 360 rotation in X/Y/Z 

 

private void setRotation(ModelRenderer model, float rotX, float rotZ, float rotY) {
			model.rotateAngleX = degToRad(rotX);
			model.rotateAngleZ = degToRad(rotZ);
            model.rotateAngleY = degToRad(rotY);
               
		}
		         protected float degToRad(float degrees)
    {
        return degrees * (float)Math.PI / 180 ;
    }

		public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) {
			super.setRotationAngles(f, f1, f2, f3, f4, f5, e);
			this.Shape1.rotateAngleZ += degToRad(-0.002F);
			this.THing1.rotateAngleX += degToRad(-0.003F);
			this.THing2.rotateAngleX += degToRad(0.003F);
			this.THing3.rotateAngleX += degToRad(-0.003F);
			this.THing4.rotateAngleX += degToRad(0.003F);
		}