Animations help

Started by UnderWaves on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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?

Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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);
		}