Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ModelGolem extends ModelBase
- {
- public ModelRenderer legRight;
- public ModelRenderer legLeft;
- public ModelRenderer bodyLow;
- public ModelRenderer bodyMed;
- public ModelRenderer bodyTop;
- public ModelRenderer armRightSmall;
- public ModelRenderer armLeftSmall;
- public ModelRenderer armRightMain;
- public ModelRenderer armLeftMain;
- public ModelGolem(float f) { }
- public ModelGolem()
- {
- textureWidth = 64;
- textureHeight = 64;
- legRight = new ModelRenderer(this, 32, 28);
- legRight.addBox(-6.0F, 0.0F, -2.0F, 4, 8, 4, 1);
- legRight.setTextureSize(64, 64);
- legRight.setRotationPoint(0, 15, 0);
- legLeft = new ModelRenderer(this, 32, 28);
- legLeft.addBox(2.0F, 0.0F, -2.0F, 4, 8, 4, 1);
- legLeft.setTextureSize(64, 64);
- legLeft.setRotationPoint(0, 15, 0);
- bodyLow = new ModelRenderer(this, 0, 28);
- bodyLow.addBox(-6.0F, -4.0F, -2.0F, 12, 4, 4, 2);
- bodyLow.setTextureSize(64, 64);
- bodyLow.setRotationPoint(0, 12, 0);
- bodyMed = new ModelRenderer(this, 0, 16);
- bodyMed.addBox(-8.0F, -12.0F, -3.0F, 16, 6, 6, 2);
- bodyMed.setTextureSize(64, 64);
- bodyMed.setRotationPoint(0, 10, 0);
- bodyTop = new ModelRenderer(this, 0, 0);
- bodyTop.addBox(-10.0F, -24.0F, -4.0F, 20, 8, 8, 2);
- bodyTop.setTextureSize(64, 64);
- bodyTop.setRotationPoint(0, 10, 0);
- armRightSmall = new ModelRenderer(this, 44, 16);
- armRightSmall.addBox(-12.0F, -10.0F, -2.0F, 2, 10, 4, 0);
- armRightSmall.setTextureSize(64, 64);
- armRightSmall.setRotationPoint(0, 10, 0);
- armLeftSmall = new ModelRenderer(this, 44, 16);
- armLeftSmall.addBox(10.0F, -10.0F, -2.0F, 2, 10, 4, 0);
- armLeftSmall.setTextureSize(64, 64);
- armLeftSmall.setRotationPoint(0, 10, 0);
- armRightMain = new ModelRenderer(this, 44, 16);
- armRightMain.addBox(-14.0F, -22.0F, -2.0F, 2, 12, 4, 0);
- armRightMain.setTextureSize(64, 64);
- armRightMain.setRotationPoint(0, 10, 0);
- armLeftMain = new ModelRenderer(this, 44, 16);
- armLeftMain.addBox(12.0F, -22.0F, -2.0F, 2, 12, 4, 0);
- armLeftMain.setTextureSize(64, 64);
- armLeftMain.setRotationPoint(0, 10, 0);
- }
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
- {
- super.render(entity, f, f1, f2, f3, f4, f5);
- this.setRotationAngles(f, f1, f2, f3, f4, f5);
- legRight.render(f5);
- legLeft.render(f5);
- bodyLow.render(f5);
- bodyMed.render(f5);
- bodyTop.render(f5);
- armRightSmall.render(f5);
- armLeftSmall.render(f5);
- armRightMain.render(f5);
- armLeftMain.render(f5);
- }
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
- {
- float lookX = f4 / 110;
- float lookY = f3 / 105;
- float swingX = MathHelper.cos(f * 1.6662F) * 1.0F * f1;
- float swingXopposite = MathHelper.cos(f * 1.6662F + (float)Math.PI) * 1.0F * f1;
- super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
- this.bodyLow.rotateAngleX = lookX;
- this.bodyLow.rotateAngleY = lookY;
- this.bodyMed.rotateAngleX = lookX;
- this.bodyMed.rotateAngleY = lookY;
- this.bodyTop.rotateAngleX = lookX;
- this.bodyTop.rotateAngleY = lookY;
- this.armRightSmall.rotateAngleX = lookX;
- this.armRightSmall.rotateAngleY = lookY;
- this.armRightMain.rotateAngleY = lookY;
- this.armLeftSmall.rotateAngleY = lookY;
- this.armLeftSmall.rotateAngleX = lookX;
- this.armLeftMain.rotateAngleY = lookY;
- this.legRight.rotateAngleX = swingX;
- this.legLeft.rotateAngleX = swingXopposite;
- this.armLeftMain.rotateAngleX = lookX;
- this.armRightMain.rotateAngleX = lookX;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement