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); setRotationAngles(f, f1, f2, f3, f4, f5); Crystal.render(f5); Rod.render(f5); Bottom.render(f5); }
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { float f6 = f2 * 3.141593F * -0.1F; for (int i = 0; i < 4; i++) { field_40323_a[i].rotationPointY = -2F + MathHelper.cos(((float) (i * 2) + f2) * 0.25F); field_40323_a[i].rotationPointX = MathHelper.cos(f6) * 9F; field_40323_a[i].rotationPointZ = MathHelper.sin(f6) * 9F; f6 += 1.570796F; } f6 = 0.7853982F + f2 * 3.141593F * 0.03F; for (int j = 4; j < 8; j++) { field_40323_a[j].rotationPointY = 2.0F + MathHelper.cos(((float) (j * 2) + f2) * 0.25F); field_40323_a[j].rotationPointX = MathHelper.cos(f6) * 7F; field_40323_a[j].rotationPointZ = MathHelper.sin(f6) * 7F; f6 += 1.570796F; } f6 = 0.4712389F + f2 * 3.141593F * -0.05F; for (int k = 8; k < 12; k++) { field_40323_a[k].rotationPointY = 11F + MathHelper.cos(((float) k * 1.5F + f2) * 0.5F); field_40323_a[k].rotationPointX = MathHelper.cos(f6) * 5F; field_40323_a[k].rotationPointZ = MathHelper.sin(f6) * 5F; f6 += 1.570796F; } field_40322_b.rotateAngleY = f3 / 57.29578F; field_40322_b.rotateAngleX = f4 / 57.29578F; }
/** Sets the models various rotation angles then renders the model. */ public void render( Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7); field_40340_a.render(par7); field_40338_b.render(par7); field_40336_d.render(par7); field_40337_e.render(par7); field_40339_c.render(par7); }
/** Sets the models various rotation angles then renders the model. */ public void render( Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7); slimeBodies.render(par7); if (slimeRightEye != null) { slimeRightEye.render(par7); slimeLeftEye.render(par7); slimeMouth.render(par7); } }
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); setRotationAngles(f, f1, f2, f3, f4, f5); Shape3.render(f5); Shape4.render(f5); head.render(f5); body.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); Shape1.render(f5); Shape2.render(f5); }
public ModelSlime(int par1) { slimeBodies = new ModelRenderer(this, 0, par1); slimeBodies.addBox(-4F, 16F, -4F, 8, 8, 8); if (par1 > 0) { slimeBodies = new ModelRenderer(this, 0, par1); slimeBodies.addBox(-3F, 17F, -3F, 6, 6, 6); slimeRightEye = new ModelRenderer(this, 32, 0); slimeRightEye.addBox(-3.25F, 18F, -3.5F, 2, 2, 2); slimeLeftEye = new ModelRenderer(this, 32, 4); slimeLeftEye.addBox(1.25F, 18F, -3.5F, 2, 2, 2); slimeMouth = new ModelRenderer(this, 32, 8); slimeMouth.addBox(0.0F, 21F, -3.5F, 1, 1, 1); } }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { setRotationAngles(f, f1, f2, f3, f4, f5); field_40322_b.render(f5); for (int i = 0; i < field_40323_a.length; i++) { field_40323_a[i].render(f5); } }
public void func_864_b(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { func_863_a(f, f1, f2, f3, f4, f5); field_21123_a.func_922_a(f5); for (int i = 0; i < field_21122_b.length; i++) { field_21122_b[i].func_922_a(f5); } }
/** Sets the models various rotation angles. */ public void setRotationAngles( float par1, float par2, float par3, float par4, float par5, float par6) { field_40340_a.rotateAngleY = par4 / (180F / (float) Math.PI); field_40340_a.rotateAngleX = par5 / (180F / (float) Math.PI); field_40339_c.rotationPointY = 3F; field_40339_c.rotationPointZ = -1F; field_40339_c.rotateAngleX = -0.75F; field_40336_d.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.4F * par2 * 0.5F; field_40337_e.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float) Math.PI) * 1.4F * par2 * 0.5F; field_40336_d.rotateAngleY = 0.0F; field_40337_e.rotateAngleY = 0.0F; }
public ModelBlaze() { field_40323_a = new ModelRenderer[12]; for (int i = 0; i < field_40323_a.length; i++) { field_40323_a[i] = new ModelRenderer(this, 0, 16); field_40323_a[i].addBox(0.0F, 0.0F, 0.0F, 2, 8, 2); } field_40322_b = new ModelRenderer(this, 0, 0); field_40322_b.addBox(-4F, -4F, -4F, 8, 8, 8); }
/** Sets the models various rotation angles then renders the model. */ public void render( Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); ModelRenderer[] var8 = this.field_82904_b; int var9 = var8.length; int var10; ModelRenderer var11; for (var10 = 0; var10 < var9; ++var10) { var11 = var8[var10]; var11.render(par7); } var8 = this.field_82905_a; var9 = var8.length; for (var10 = 0; var10 < var9; ++var10) { var11 = var8[var10]; var11.render(par7); } }
public ModelSquid() { field_21122_b = new ModelRenderer[8]; byte byte0 = -16; field_21123_a = new ModelRenderer(this, 0, 0); field_21123_a.func_40604_a(-6F, -8F, -6F, 12, 16, 12); field_21123_a.field_1409_b += 24 + byte0; for (int i = 0; i < field_21122_b.length; i++) { field_21122_b[i] = new ModelRenderer(this, 48, 0); double d = ((double) i * 3.1415926535897931D * 2D) / (double) field_21122_b.length; float f = (float) Math.cos(d) * 5F; float f1 = (float) Math.sin(d) * 5F; field_21122_b[i].func_40604_a(-1F, 0.0F, -1F, 2, 18, 2); field_21122_b[i].field_1410_a = f; field_21122_b[i].field_1408_c = f1; field_21122_b[i].field_1409_b = 31 + byte0; d = ((double) i * 3.1415926535897931D * -2D) / (double) field_21122_b.length + 1.5707963267948966D; field_21122_b[i].field_1406_e = (float) d; } }
public void func_864_b( Entity p_864_1_, float p_864_2_, float p_864_3_, float p_864_4_, float p_864_5_, float p_864_6_, float p_864_7_) { func_863_a(p_864_2_, p_864_3_, p_864_4_, p_864_5_, p_864_6_, p_864_7_); field_40344_b.func_922_a(p_864_7_); for (int i = 0; i < field_40345_a.length; i++) { field_40345_a[i].func_922_a(p_864_7_); } }
public ModelSolarPanel() { textureWidth = 64; textureHeight = 32; Shape1 = new ModelRenderer(this, 0, 16); Shape1.addBox(0F, 0F, 0F, 10, 1, 10); Shape1.setRotationPoint(-5F, 23F, -5F); Shape1.setTextureSize(64, 32); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 0); Shape2.addBox(0F, 0F, 0F, 8, 3, 8); Shape2.setRotationPoint(-4F, 20F, -4F); Shape2.setTextureSize(64, 32); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); }
public void setRotationAngles( float par1, float par2, float par3, float par4, float par5, float par6) { // head.rotateAngleX = par5 / (180F / (float)Math.PI); head.rotateAngleY = par4 / (180F / (float) Math.PI); body.rotateAngleX = ((float) Math.PI / 2F); leg1.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.2F * par2; leg2.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float) Math.PI) * 1.2F * par2; leg3.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float) Math.PI) * 1.2F * par2; leg4.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.2F * par2; }
public ModelMagmaCube() { field_40345_a = new ModelRenderer[8]; for (int i = 0; i < field_40345_a.length; i++) { byte byte0 = 0; int j = i; if (i == 2) { byte0 = 24; j = 10; } else if (i == 3) { byte0 = 24; j = 19; } field_40345_a[i] = new ModelRenderer(this, byte0, j); field_40345_a[i].func_40604_a(-4F, 16 + i, -4F, 8, 1, 8); } field_40344_b = new ModelRenderer(this, 0, 16); field_40344_b.func_40604_a(-2F, 18F, -2F, 4, 4, 4); }
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); setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); Shape2.render(f5); }
public void draw(CanvasInterface canvas) { ModelRenderer.RenderBody(groundBody, 0, canvas); }
public ModelLightCrystal() { textureWidth = 64; textureHeight = 32; Crystal = new ModelRenderer(this, 9, 0); Crystal.addBox(0F, 0F, 0F, 4, 4, 4); Crystal.setRotationPoint(-2F, 8F, -2F); Crystal.setTextureSize(64, 32); Crystal.mirror = true; setRotation(Crystal, 0F, 0F, 0F); Rod = new ModelRenderer(this, 0, 0); Rod.addBox(0F, 0F, 0F, 2, 12, 2); Rod.setRotationPoint(-1F, 12F, -1F); Rod.setTextureSize(64, 32); Rod.mirror = true; setRotation(Rod, 0F, 0F, 0F); Bottom = new ModelRenderer(this, 9, 9); Bottom.addBox(0F, 0F, 0F, 4, 1, 4); Bottom.setRotationPoint(-2F, 23F, -2F); Bottom.setTextureSize(64, 32); Bottom.mirror = true; setRotation(Bottom, 0F, 0F, 0F); }
public ModelChevalBlanc() { textureWidth = 128; textureHeight = 64; Shape3 = new ModelRenderer(this, 8, 20); Shape3.addBox(0F, 0F, 0F, 1, 2, 2); Shape3.setRotationPoint(1F, -6F, -11F); Shape3.setTextureSize(128, 64); Shape3.mirror = true; setRotation(Shape3, 0.5576792F, 0F, 0F); Shape4 = new ModelRenderer(this, 77, 49); Shape4.addBox(-1.5F, 0F, 0F, 3, 10, 3); Shape4.setRotationPoint(0F, 2.2F, 14.33333F); Shape4.setTextureSize(128, 64); Shape4.mirror = true; setRotation(Shape4, 0.3346075F, 0F, 0F); head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -4F, -9F, 6, 4, 12); head.setRotationPoint(1F, -6F, -11F); head.setTextureSize(128, 64); head.mirror = true; setRotation(head, 0.5576792F, 0F, 0F); body = new ModelRenderer(this, 83, 0); body.addBox(-6F, -10F, -7F, 12, 24, 10); body.setRotationPoint(0F, 5F, 2F); body.setTextureSize(128, 64); body.mirror = true; setRotation(body, 1.570796F, 0F, 0F); leg1 = new ModelRenderer(this, 32, 48); leg1.addBox(-3F, 0F, 0F, 4, 12, 4); leg1.setRotationPoint(-3F, 12F, 11.7F); leg1.setTextureSize(128, 64); leg1.mirror = true; setRotation(leg1, 0F, 0F, 0F); leg2 = new ModelRenderer(this, 48, 48); leg2.addBox(0F, 0F, 0F, 4, 12, 4); leg2.setRotationPoint(2F, 12F, 11.5F); leg2.setTextureSize(128, 64); leg2.mirror = true; setRotation(leg2, 0F, 0F, 0F); leg3 = new ModelRenderer(this, 17, 48); leg3.addBox(-3F, 0F, -3F, 4, 12, 4); leg3.setRotationPoint(-3F, 12F, -5F); leg3.setTextureSize(128, 64); leg3.mirror = true; setRotation(leg3, 0F, 0F, 0F); leg4 = new ModelRenderer(this, 0, 48); leg4.addBox(-1F, 0F, -3F, 4, 12, 4); leg4.setRotationPoint(3F, 12F, -5F); leg4.setTextureSize(128, 64); leg4.mirror = true; setRotation(leg4, 0F, 0F, 0F); Shape1 = new ModelRenderer(this, 43, 0); Shape1.addBox(-2.5F, -5F, -13F, 5, 7, 15); Shape1.setRotationPoint(0F, 5F, -6F); Shape1.setTextureSize(128, 64); Shape1.mirror = true; setRotation(Shape1, -0.9529016F, 0F, 0F); Shape2 = new ModelRenderer(this, 1, 20); Shape2.addBox(0F, 0F, 0F, 1, 2, 2); Shape2.setRotationPoint(1F, -6F, -11F); Shape2.setTextureSize(128, 64); Shape2.mirror = true; setRotation(Shape2, 0.5759587F, 0F, 0F); body.setRotationPoint(0.0F, 5F, 2.0F); leg1.rotationPointX--; leg2.rotationPointX++; leg1.rotationPointZ += 0.0F; leg2.rotationPointZ += 0.0F; leg3.rotationPointX--; leg4.rotationPointX++; leg3.rotationPointZ--; leg4.rotationPointZ--; }
private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; }
public void renderModel(float f1) { Crystal.render(f1); Rod.render(f1); Bottom.render(f1); }
public ModelVillager(float par1, float par2) { field_40334_f = 0; field_40335_g = 0; field_40341_n = false; field_40342_o = false; byte byte0 = 64; byte byte1 = 64; field_40340_a = (new ModelRenderer(this)).setTextureSize(byte0, byte1); field_40340_a.setRotationPoint(0.0F, 0.0F + par2, 0.0F); field_40340_a.setTextureOffset(0, 0).addBox(-4F, -10F, -4F, 8, 10, 8, par1); field_40340_a.setTextureOffset(24, 0).addBox(-1F, -3F, -6F, 2, 4, 2, par1); field_40338_b = (new ModelRenderer(this)).setTextureSize(byte0, byte1); field_40338_b.setRotationPoint(0.0F, 0.0F + par2, 0.0F); field_40338_b.setTextureOffset(16, 20).addBox(-4F, 0.0F, -3F, 8, 12, 6, par1); field_40338_b.setTextureOffset(0, 38).addBox(-4F, 0.0F, -3F, 8, 18, 6, par1 + 0.5F); field_40339_c = (new ModelRenderer(this)).setTextureSize(byte0, byte1); field_40339_c.setRotationPoint(0.0F, 0.0F + par2 + 2.0F, 0.0F); field_40339_c.setTextureOffset(44, 22).addBox(-8F, -2F, -2F, 4, 8, 4, par1); field_40339_c.setTextureOffset(44, 22).addBox(4F, -2F, -2F, 4, 8, 4, par1); field_40339_c.setTextureOffset(40, 38).addBox(-4F, 2.0F, -2F, 8, 4, 4, par1); field_40336_d = (new ModelRenderer(this, 0, 22)).setTextureSize(byte0, byte1); field_40336_d.setRotationPoint(-2F, 12F + par2, 0.0F); field_40336_d.addBox(-2F, 0.0F, -2F, 4, 12, 4, par1); field_40337_e = (new ModelRenderer(this, 0, 22)).setTextureSize(byte0, byte1); field_40337_e.mirror = true; field_40337_e.setRotationPoint(2.0F, 12F + par2, 0.0F); field_40337_e.addBox(-2F, 0.0F, -2F, 4, 12, 4, par1); }
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); setRotationAngles(f, f1, f2, f3, f4, f5); Rod1.render(f5); Wheel1.render(f5); Rod2.render(f5); Rod3.render(f5); Rod4.render(f5); Wheel2.render(f5); Rod5.render(f5); Rod6.render(f5); Hand1.render(f5); Rod7.render(f5); Hand2.render(f5); Rod8.render(f5); BackSide.render(f5); Main1.render(f5); Main2.render(f5); Liquid.render(f5); MainBack.render(f5); Main3.render(f5); Main4.render(f5); }
public ThxModelHelicopter() { renderTexture = "/thx/helicopter.png"; ENABLE_ROTOR = mod_Thx.getBoolProperty("enable_rotor"); // All model boxes are now scaled x2 at rendering time to save texture space // (with the exception of the windsheield which is already min size) bottom: { // 1. to save texture space, create piece in upright orientation // 2. then we have to rotate piece back into place // 3. make half size and then scale later to save texture area // 4. also have to adjust ("reduce") position (rotationPt) since it moves when we scale float length = 10f; float height = 8f; float width = 2f; bottom = new ModelRenderer(this, 0, 22); // texture offset: bottom.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); bottom.setRotationPoint( 0f * centerScale, 2f * centerScale, 0f * centerScale); // halved to adjust for scale bottom.rotateAngleX = PI / 2f; // 90 deg roll left to lay flat } frontWall: { // rotate about Y, so 2x6x20 -> 20x6x2 // will be scaled x2 at render float length = 10f; float height = 3f; float width = 1f; frontWall = new ModelRenderer(this, 0, 4); frontWall.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); frontWall.setRotationPoint( -5.5f * centerScale, 0f * centerScale, 0f * centerScale); // placed 11 unit in front frontWall.rotateAngleY = PI * 1.5f; // 270 deg yaw } backWall: { // will be scaled x2 at render float length = 10f; float height = 3f; float width = 1f; backWall = new ModelRenderer(this, 0, 9); backWall.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); backWall.setRotationPoint(5.5f * centerScale, 0f * centerScale, 0f * centerScale); backWall.rotateAngleY = PI / 2f; // 90 deg yaw } leftWall: { // will be scaled x2 at render float length = 10f; float height = 3f; float width = 1f; leftWall = new ModelRenderer(this, 25, 19); leftWall.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); leftWall.setRotationPoint(0f * centerScale, 0f * centerScale, -4.5f * centerScale); } rightWall: { // will be scaled x2 at render float length = 10f; float height = 3f; float width = 1f; rightWall = new ModelRenderer(this, 25, 24); rightWall.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); rightWall.setRotationPoint(0f * centerScale, 0f * centerScale, 4.5f * centerScale); rightWall.rotateAngleY = PI; // flip 180 deg so decal is on outside } mainRotor: { // will be scaled x2 at render float length = 30f; float height = 0f; float width = 1f; mainRotor = new ModelRenderer(this, 0, 0); mainRotor.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); mainRotor.setRotationPoint( 2f * centerScale, -11.7f * centerScale, 0f * centerScale); // halved to adjust for scale, and a little subtracted } tailRotor: { // will be scaled x2 at render float length = 8f; float height = 1f; float width = 0f; tailRotor = new ModelRenderer(this, 0, 2); tailRotor.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); tailRotor.setRotationPoint(16f * centerScale, -7f * centerScale, .7f * centerScale); } tail: { // will be scaled x2 at render float length = 10f; float height = 2f; float width = 1f; tail = new ModelRenderer(this, 42, 29); tail.addBox(-length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); tail.setRotationPoint(12f * centerScale, -7f * centerScale, 0f * centerScale); } rotorVerticalSupport: { // will be scaled x2 at render float length = 1f; float height = 11f; float width = 2f; rotor2 = new ModelRenderer(this, 58, 11); rotor2.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); rotor2.setRotationPoint(6.5f * centerScale, -5f * centerScale, 0f * centerScale); } rotorHorizontalSupport: { // will be scaled x2 at render float length = 6f; float height = 1f; float width = 2f; rotor3 = new ModelRenderer(this, 48, 25); rotor3.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); rotor3.setRotationPoint(4f * centerScale, -11f * centerScale, 0f * centerScale); } windshield: { float length = 9f; float height = 7f; float width = 0f; windshield = new ModelRenderer(this, 22, 2); windshield.addBox( -length / 2f, -height / 2f, -width / 2f, (int) length, (int) height, (int) width); windshield.setRotationPoint(-5.5f * centerScale, -4.5f * centerScale, 0f * centerScale); windshield.rotateAngleY = PI * 1.5f; // 270 deg yaw } }
public void render() { update(); // System.out.println("Model delta time sec: " + deltaTime); if (!visible) return; if (bottomVisible) bottom.render(x2scale); frontWall.render(x2scale); backWall.render(x2scale); leftWall.render(x2scale); rightWall.render(x2scale); // windshield // cockpit1.render(scale); // cockpit2.render(scale); // cockpit3.render(scale); windshield.render(x2scale); // rotor supports rotor2.render(x2scale); rotor3.render(x2scale); tail.render(x2scale); if (ENABLE_ROTOR && !paused) { if (rotorSpeed > 0f) { if (timeSpun < SPIN_UP_TIME) { timeSpun += deltaTime * 3f; // spin up faster than spin down mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * rotorSpeed * timeSpun / SPIN_UP_TIME; tailRotor.rotateAngleZ -= deltaTime * MAX_ROTOR_SPEED * timeSpun / SPIN_UP_TIME; // not linked to throttle } else { mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * rotorSpeed; tailRotor.rotateAngleZ -= deltaTime * MAX_ROTOR_SPEED; } if (mainRotor.rotateAngleY > 2 * PI) mainRotor.rotateAngleY -= 2 * PI; mainRotor.render(x2scale); mainRotor.rotateAngleY += 1.5707f; // add second blade perp mainRotor.render(x2scale); if (tailRotor.rotateAngleZ < 2 * PI) tailRotor.rotateAngleZ += 2 * PI; tailRotor.render(x2scale); tailRotor.rotateAngleZ -= 1.5707f; // add second blade perp tailRotor.render(x2scale); } else { rotorSpeed = 0f; if (timeSpun > 0f) { timeSpun -= deltaTime; mainRotor.rotateAngleY += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME)); tailRotor.rotateAngleZ += deltaTime * MAX_ROTOR_SPEED * (1 - MathHelper.cos(timeSpun / SPIN_UP_TIME)); // remember stopping position lastRotorRad = mainRotor.rotateAngleY; lastTailRotorRad = tailRotor.rotateAngleZ; } else { mainRotor.rotateAngleY = lastRotorRad; tailRotor.rotateAngleZ = lastTailRotorRad; } mainRotor.render(x2scale); mainRotor.rotateAngleY += 1.5707f; // add second blade perp mainRotor.render(x2scale); tailRotor.render(x2scale); tailRotor.rotateAngleZ -= 1.5707f; // add second blade perp tailRotor.render(x2scale); } } else { // show fixed rotor by rendering twice mainRotor.rotateAngleY = 0.7854f; mainRotor.render(x2scale); mainRotor.rotateAngleY += 1.5707f; mainRotor.render(x2scale); tailRotor.rotateAngleZ = 0.7854f; tailRotor.render(x2scale); tailRotor.rotateAngleZ += 1.5707f; tailRotor.render(x2scale); } }
public ModelNew() { textureWidth = 64; textureHeight = 32; Rod1 = new ModelRenderer(this, 0, 0); Rod1.addBox(0F, 0F, 0F, 13, 1, 1); Rod1.setRotationPoint(-7F, 21F, 3F); Rod1.setTextureSize(64, 32); Rod1.mirror = true; setRotation(Rod1, 0F, 0F, 0F); Wheel1 = new ModelRenderer(this, 52, 0); Wheel1.addBox(0F, 0F, 0F, 1, 5, 5); Wheel1.setRotationPoint(-8F, 19F, 1F); Wheel1.setTextureSize(64, 32); Wheel1.mirror = true; setRotation(Wheel1, 0F, 0F, 0F); Rod2 = new ModelRenderer(this, 0, 0); Rod2.addBox(0F, 0F, 0F, 1, 1, 6); Rod2.setRotationPoint(4F, 23F, -2F); Rod2.setTextureSize(64, 32); Rod2.mirror = true; setRotation(Rod2, 0.3490659F, 0F, 0F); Rod3 = new ModelRenderer(this, 0, 0); Rod3.addBox(0F, 0F, 0F, 11, 1, 1); Rod3.setRotationPoint(-6F, 23F, -2F); Rod3.setTextureSize(64, 32); Rod3.mirror = true; setRotation(Rod3, 0F, 0F, 0F); Rod4 = new ModelRenderer(this, 0, 0); Rod4.addBox(0F, 0F, 0F, 1, 1, 6); Rod4.setRotationPoint(5F, 23F, -7F); Rod4.setTextureSize(64, 32); Rod4.mirror = true; setRotation(Rod4, 0F, 0F, 0F); Wheel2 = new ModelRenderer(this, 52, 0); Wheel2.addBox(0F, 0F, 0F, 1, 5, 5); Wheel2.setRotationPoint(6F, 19F, 1F); Wheel2.setTextureSize(64, 32); Wheel2.mirror = true; setRotation(Wheel2, 0F, 0F, 0F); Rod5 = new ModelRenderer(this, 0, 0); Rod5.addBox(0F, 0F, 0F, 1, 13, 1); Rod5.setRotationPoint(4F, 9F, 4F); Rod5.setTextureSize(64, 32); Rod5.mirror = true; setRotation(Rod5, -0.0872665F, 0F, 0F); Rod6 = new ModelRenderer(this, 0, 0); Rod6.addBox(0F, 0F, 0F, 1, 1, 6); Rod6.setRotationPoint(-6F, 23F, -2F); Rod6.setTextureSize(64, 32); Rod6.mirror = true; setRotation(Rod6, 0.3490659F, 0F, 0F); Hand1 = new ModelRenderer(this, 0, 27); Hand1.addBox(0F, 0F, 0F, 1, 1, 4); Hand1.setRotationPoint(4F, 9F, 4F); Hand1.setTextureSize(64, 32); Hand1.mirror = true; setRotation(Hand1, 0F, 0F, 0F); Rod7 = new ModelRenderer(this, 0, 0); Rod7.addBox(0F, 0F, 0F, 1, 1, 6); Rod7.setRotationPoint(-7F, 23F, -7F); Rod7.setTextureSize(64, 32); Rod7.mirror = true; setRotation(Rod7, 0F, 0F, 0F); Hand2 = new ModelRenderer(this, 0, 27); Hand2.addBox(0F, 0F, 0F, 1, 1, 4); Hand2.setRotationPoint(-6F, 9F, 4F); Hand2.setTextureSize(64, 32); Hand2.mirror = true; setRotation(Hand2, 0F, 0F, 0F); Rod8 = new ModelRenderer(this, 0, 0); Rod8.addBox(0F, 0F, 0F, 1, 13, 1); Rod8.setRotationPoint(-6F, 9F, 4F); Rod8.setTextureSize(64, 32); Rod8.mirror = true; setRotation(Rod8, -0.0872665F, 0F, 0F); BackSide = new ModelRenderer(this, 0, 0); BackSide.addBox(0F, 0F, 0F, 9, 7, 1); BackSide.setRotationPoint(-5F, 13F, 4F); BackSide.setTextureSize(64, 32); BackSide.mirror = true; setRotation(BackSide, -0.0872665F, 0F, 0F); Main1 = new ModelRenderer(this, 47, 20); Main1.addBox(0F, 0F, 0F, 2, 5, 7); Main1.setRotationPoint(2F, 11.5F, -3F); Main1.setTextureSize(64, 32); Main1.mirror = true; setRotation(Main1, -0.3490659F, 0F, 0F); Main2 = new ModelRenderer(this, 40, 22); Main2.addBox(0F, 0F, 0F, 5, 2, 7); Main2.setRotationPoint(-3F, 10F, -2.5F); Main2.setTextureSize(64, 32); Main2.mirror = true; setRotation(Main2, -0.3490659F, 0F, 0F); Liquid = new ModelRenderer(this, 21, 14); Liquid.addBox(0F, 0F, 0F, 5, 1, 6); Liquid.setRotationPoint(-3F, 16F, -3.5F); Liquid.setTextureSize(64, 32); Liquid.mirror = true; setRotation(Liquid, -0.0856988F, 0F, 0F); MainBack = new ModelRenderer(this, 53, 26); MainBack.addBox(0F, 0F, 0F, 5, 5, 1); MainBack.setRotationPoint(-3F, 14F, 3F); MainBack.setTextureSize(64, 32); MainBack.mirror = true; setRotation(MainBack, -0.3490659F, 0F, 0F); Main3 = new ModelRenderer(this, 47, 20); Main3.addBox(0F, 0F, 0F, 2, 5, 7); Main3.setRotationPoint(-5F, 11.5F, -3F); Main3.setTextureSize(64, 32); Main3.mirror = true; setRotation(Main3, -0.3490659F, 0F, 0F); Main4 = new ModelRenderer(this, 41, 23); Main4.addBox(0F, 0F, 0F, 5, 2, 7); Main4.setRotationPoint(-3F, 16F, -4.5F); Main4.setTextureSize(64, 32); Main4.mirror = true; setRotation(Main4, -0.3490659F, 0F, 0F); }