Пример #1
0
 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 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 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--;
  }
  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
    }
  }
Пример #6
0
  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);
  }