Package com.flansmod.client.tmt

Examples of com.flansmod.client.tmt.ModelRendererTurbo


  {
    int textureX = 64;
    int textureY = 32;
   
    gunModel = new ModelRendererTurbo[15];
    gunModel[0] = new ModelRendererTurbo(this,  00, textureX, textureY); // barrel1
    gunModel[1] = new ModelRendererTurbo(this,  09, textureX, textureY); // slidemain2
    gunModel[2] = new ModelRendererTurbo(this,  014, textureX, textureY); // slidemain3
    gunModel[3] = new ModelRendererTurbo(this,  017, textureX, textureY); // slidemain4

    gunModel[8] = new ModelRendererTurbo(this,  427, textureX, textureY); // slidemain5
    gunModel[9] = new ModelRendererTurbo(this,  425, textureX, textureY); // slidemain6
    gunModel[10] = new ModelRendererTurbo(this,  423, textureX, textureY); // slidemain5
    gunModel[11] = new ModelRendererTurbo(this,  1224, textureX, textureY); // slideblock1
    gunModel[12] = new ModelRendererTurbo(this,  07, textureX, textureY); // trigger1
    gunModel[13] = new ModelRendererTurbo(this,  66, textureX, textureY); // trigger2
    gunModel[14] = new ModelRendererTurbo(this,  1222, textureX, textureY); // Chamber1
    gunModel[4] = new ModelRendererTurbo(this,  2218, textureX, textureY); // slidewhatever
    gunModel[5] = new ModelRendererTurbo(this,  107, textureX, textureY); // slideblock2
    gunModel[6] = new ModelRendererTurbo(this,  2014, textureX, textureY); // slideblock3
    gunModel[7] = new ModelRendererTurbo(this,  2016, textureX, textureY); // slideblock4

    gunModel[0].addBox(0F, 0F, 0F, 12, 1, 1, 0F); // barrel1
    gunModel[0].setRotationPoint(6F, 3.8F, -0.5F);

    gunModel[1].addBox(0F, 0F, 0F, 8, 2, 2, 0F); // slidemain2
    gunModel[1].setRotationPoint(6F, 3F, -1F);

    gunModel[2].addBox(0F, 0F, 0F, 9, 1, 1, 0F); // slidemain3
    gunModel[2].setRotationPoint(6F, 2.5F, -0.5F);

    gunModel[3].addBox(0F, 0F, 0F, 9, 1, 1, 0F); // slidemain4
    gunModel[3].setRotationPoint(4.9F, 4.2F, -0.5F);

    gunModel[8].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // slidemain5
    gunModel[8].setRotationPoint(9.2F, 4.3F, -0.2F);

    gunModel[9].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // slidemain6
    gunModel[9].setRotationPoint(9.2F, 4.3F, -0.8F);

    gunModel[10].addBox(0F, 0F, 0F, 2, 1, 1, 0F); // slidemain5
    gunModel[10].setRotationPoint(9.7F, 4.4F, -0.5F);

    gunModel[11].addBox(0F, 0F, 0F, 3, 3, 2, 0F); // slideblock1
    gunModel[11].setRotationPoint(3F, 2.5F, -1F);

    gunModel[12].addBox(0F, 0F, 0F, 2, 1, 1, 0F); // trigger1
    gunModel[12].setRotationPoint(3.5F, 2.2F, -0.5F);

    gunModel[13].addBox(0F, 0F, 0F, 1, 2, 1, 0F); // trigger2
    gunModel[13].setRotationPoint(3.5F, 0.2F, -0.5F);

    gunModel[14].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Chamber1
    gunModel[14].setRotationPoint(5.8F, 3.5F, -1.1F);

    gunModel[4].addBox(0F, 0F, -1F, 2, 2, 1, 0F); // slidewhatever
    gunModel[4].setRotationPoint(6.8F, 2.9F, 1.2F);

    gunModel[5].addBox(0F, -0.6666667F, 0F, 3, 1, 1, 0F); // slideblock2
    gunModel[5].setRotationPoint(5F, 5F, -0.9F);

    gunModel[6].addBox(0F, -0.6666667F, 0F, 3, 1, 1, 0F); // slideblock3
    gunModel[6].setRotationPoint(5F, 5F, -0.1F);

    gunModel[7].addBox(0F, -0.6666667F, 0F, 3, 1, 1, 0F); // slideblock4
    gunModel[7].setRotationPoint(5.1F, 5.1F, -0.5F)
   
    //Scope
    scopeAttachPoint = new Vector3f(2F / 16F, 3.333F / 16F, 0F);

    //defaultStock
    defaultStockModel = new ModelRendererTurbo[4];
    defaultStockModel[0] = new ModelRendererTurbo(this,  2011, textureX, textureY); // defaultstock1
    defaultStockModel[1] = new ModelRendererTurbo(this,  2411, textureX, textureY); // defaultstock2
    defaultStockModel[2] = new ModelRendererTurbo(this,  05, textureX, textureY); // defaultstock3
    defaultStockModel[3] = new ModelRendererTurbo(this,  207, textureX, textureY); // defaultstock4

    defaultStockModel[0].addBox(0F, 0F, 0F, 1, 2, 1, 0F); // defaultstock1
    defaultStockModel[0].setRotationPoint(2F, 3.3F, -0.8F);

    defaultStockModel[1].addBox(0F, 0F, 0F, 1, 2, 1, 0F); // defaultstock2
    defaultStockModel[1].setRotationPoint(2F, 3.3F, -0.2F);

    defaultStockModel[2].addBox(0F, 0F, 0F, 2, 1, 1, 0F); // defaultstock3
    defaultStockModel[2].setRotationPoint(1F, 4.4F, -0.5F);

    defaultStockModel[3].addBox(0F, 0F, 0F, 1, 3, 1, 0F); // defaultstock4
    defaultStockModel[3].setRotationPoint(0F, 2.4F, -0.5F)
   
    stockAttachPoint = new Vector3f(1F / 16F, 4F / 16F, 0F);
   
    //Barrel   
    barrelAttachPoint = new Vector3f(18F / 16F, 4F / 16F, 0F);
   
    //Grip
    gripAttachPoint = new Vector3f(8F / 16F, 0.5F / 16F, 0F);
   
    defaultGripModel = new ModelRendererTurbo[4];
   
    defaultGripModel[0] = new ModelRendererTurbo(this,  020, textureX, textureY); // Foregrip1
    defaultGripModel[1] = new ModelRendererTurbo(this,  024, textureX, textureY); // Foregrip2
    defaultGripModel[2] = new ModelRendererTurbo(this,  029, textureX, textureY); // Foregrip3
    defaultGripModel[3] = new ModelRendererTurbo(this,  429, textureX, textureY); // Foregrip4
   
    defaultGripModel[0].addBox(0F, -1F, 0F, 4, 1, 2, 0F); // Foregrip1
    defaultGripModel[0].setRotationPoint(8.5F, 3F, -1F);

    defaultGripModel[1].addBox(0F, -3F, 0F, 1, 3, 1, 0F); // Foregrip2
    defaultGripModel[1].setRotationPoint(10.5F, 2.5F, -0.5F);
    defaultGripModel[1].rotateAngleZ = -0.3141593F;

    defaultGripModel[2].addBox(0F, -1F, 0F, 1, 1, 1, 0F); // Foregrip3
    defaultGripModel[2].setRotationPoint(10.4F, 3.4F, 0.1F);

    defaultGripModel[3].addBox(0F, -1F, 0F, 1, 1, 1, 0F); // Foregrip4
    defaultGripModel[3].setRotationPoint(10.4F, 3.4F, -1.1F);
   
    //Bolt
    slideModel = new ModelRendererTurbo[2];
    slideModel[0] = new ModelRendererTurbo(this,  1820, textureX, textureY); // bolt2
    slideModel[1] = new ModelRendererTurbo(this,  2221, textureX, textureY); // bolt1

    slideModel[0].addBox(0F, 0F, -1F, 1, 1, 1, 0F); // bolt2
    slideModel[0].setRotationPoint(10.8F, 3.5F, 1.2F);

    slideModel[1].addBox(0F, 0F, -1F, 4, 1, 1, 0F); // bolt1
    slideModel[1].setRotationPoint(7.8F, 3.5F, 1.1F)
   
    //Ammo
    ammoModel = new ModelRendererTurbo[2];
    ammoModel[0] = new ModelRendererTurbo(this,  2223, textureX, textureY); // Ammobox1
    ammoModel[1] = new ModelRendererTurbo(this,  1219, textureX, textureY); // Ammobox2

    ammoModel[0].addBox(0F, 0F, 0F, 3, 3, 3, 0F); // Ammobox1
    ammoModel[0].setRotationPoint(5.8F, 0F, -2.4F);

    ammoModel[1].addBox(0F, 2.5F, -1.5F, 2, 2, 1, 0F); // Ammobox2
View Full Code Here


    int textureX = 16;
    int textureY = 8;
   
    gunModel = new ModelRendererTurbo[2];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(-4F, -1F, -1F, 4, 2, 2);
   
    gunModel[1] = new ModelRendererTurbo(this, 0, 6, textureX, textureY);
    gunModel[1].addBox(0F, -0.5F, -0.5F, 4, 1, 1);
   
    for(int i = 0; i < 2; i++)
      gunModel[i].setRotationPoint(0F, 12F, 0F);
   
View Full Code Here

    {
    int textureX = 128; //The x-size of the texture
    int textureY = 64//The y-size of the texture
 
    propellerModels = new ModelRendererTurbo[1][3]; //1 propeller in 3 parts
        propellerModels[0][0] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 0 : 56, 8 is the texture origin
        propellerModels[0][1] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 1
        propellerModels[0][2] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 2 
        propellerModels[0][0].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)//Model the propeller blade by adding a box
        propellerModels[0][1].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)//First come the origin coordinates and then the size
        propellerModels[0][2].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)
        propellerModels[0][0].setRotationPoint(-14, 0, 0)//Set the position of the propeller
        propellerModels[0][1].setRotationPoint(-14, 0, 0)
        propellerModels[0][2].setRotationPoint(-14, 0, 0)
   
    yawFlapModel = new ModelRendererTurbo[1]; //Only one part to the yaw flap
    yawFlapModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
        yawFlapModel[0].addBox(0F, 0F , 0F, 10, 10, 2, 0.0F)
    yawFlapModel[0].setPosition(44F, -12F, -1F);     

    pitchFlapLeftModel = new ModelRendererTurbo[1]; //Only one part to the left pitch flap
    pitchFlapLeftModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
    pitchFlapLeftModel[0].addBox(0F, 0F , 0F, 10, 15, 2, 0.0F);
        pitchFlapLeftModel[0].rotateAngleX = 1.570796F;
    pitchFlapLeftModel[0].setPosition(44F, 3F, -15F);
   
    pitchFlapRightModel = new ModelRendererTurbo[1]; //Only one part to the right pitch flap
    pitchFlapRightModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
    pitchFlapRightModel[0].addBox(0F, 0F , 0F, 10, 15, 2, 0.0F);
        pitchFlapRightModel[0].rotateAngleX = 1.570796F;
    pitchFlapRightModel[0].setPosition(44F, 3F, 0F);
       
        bodyModel = new ModelRendererTurbo[6]; //Defining lots of texture origins for the body model
        bodyModel[0] = new ModelRendererTurbo(this, 0, 8, textureX, textureY);
        bodyModel[1] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[2] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[3] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[4] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[5] = new ModelRendererTurbo(this, 44, 0, textureX, textureY);

        byte length = 24;
        byte sidePieceHeight = 6;
        byte width = 20;
        byte boatDepth = 4;
        bodyModel[0].addBox(-length / 2, -width / 2 + 2, -3F, length, width - 4, 4, 0.0F);
        bodyModel[0].setPosition(0.0F, 0 + boatDepth, 0.0F);

        bodyModel[1].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[1].setPosition(-length / 2 + 1, 0 + boatDepth, 0.0F);

        bodyModel[2].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[2].setPosition(length / 2 - 1, 0 + boatDepth, 0.0F);

        bodyModel[3].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[3].setPosition(0.0F, 0 + boatDepth, -width / 2 + 1);

        bodyModel[4].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[4].setPosition(0.0F, 0 + boatDepth, width / 2 - 1);
   
    bodyModel[5].addBox(0F, 0F , 0F, 4, 4, 4, 0.0F);    //Propeller Centre
    bodyModel[5].setPosition(-15F, -2F, -2F);

        bodyModel[0].rotateAngleX = 1.570796F;
        bodyModel[1].rotateAngleY = 4.712389F;
        bodyModel[2].rotateAngleY = 1.570796F;
        bodyModel[3].rotateAngleY = 3.141593F;
       
       
        bayModel = new ModelRendererTurbo[5];
        bayModel[0] = new ModelRendererTurbo(this, 0, 8, textureX, textureY);
        bayModel[1] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bayModel[2] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bayModel[3] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bayModel[4] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
       
        bayModel[0].addBox(-length / 2, -width / 2 + 2, -3F, length, width - 4, 4, 0.0F);
        bayModel[0].setPosition(length, 0 + boatDepth, 0.0F);
        bayModel[1].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bayModel[1].setPosition(length - length / 2 + 1, 0 + boatDepth, 0.0F);
        bayModel[2].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bayModel[2].setPosition(length + length / 2 - 1, 0 + boatDepth, 0.0F);
        bayModel[3].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bayModel[3].setPosition(length, 0 + boatDepth, -width / 2 + 1);
        bayModel[4].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bayModel[4].setPosition(length, 0 + boatDepth, width / 2 - 1);
       
        bayModel[0].rotateAngleX = 1.570796F;
        bayModel[1].rotateAngleY = 4.712389F;
        bayModel[2].rotateAngleY = 1.570796F;
        bayModel[3].rotateAngleY = 3.141593F;
       
        //Front wheels with struts
      bodyWheelModel = new ModelRendererTurbo[4];
      bodyWheelModel[0] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
      bodyWheelModel[1] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
        bodyWheelModel[2] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
        bodyWheelModel[3] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);

        bodyWheelModel[0].addBox(-4F, 11F, 5F, 4, 4, 2, 0.0F);    //Left wheel
      bodyWheelModel[1].addBox(-4F, 11F, -7F, 4, 4, 2, 0.0F);    //Right wheel
      bodyWheelModel[2].addBox(-3F, 6F , 5F, 2, 5, 2, 0.0F);    //Left Strut   
      bodyWheelModel[3].addBox(-3F, 6F , -7F, 2, 5, 2, 0.0F);    //Right Strut

    rightWingModel = new ModelRendererTurbo[2]
    rightWingModel[0] = new ModelRendererTurbo(this, 64 , 0, textureX, textureY);
      rightWingModel[1] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);

        rightWingModel[0].addBox(0F, 0F, 0F, 18, 41, 2, 0.0F);    //Right Wing
    rightWingModel[0].rotateAngleX = -1.570796F;
    rightWingModel[0].setPosition(-9F, 0F, -9F);
    rightWingModel[1].addBox(-1F, -18F , -40F, 2, 18, 2, 0.0F)//Right Strut

   
    leftWingModel = new ModelRendererTurbo[2];
        leftWingModel[0] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
      leftWingModel[1] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
     
        leftWingModel[0].addBox(0F, 0F , 0F, 18, 41, , 0.0F)//Left Wing
    leftWingModel[0].rotateAngleX = -1.570796F;
    leftWingModel[0].setPosition(-9F, 0F, 50F);
    leftWingModel[1].addBox(-1F, -18F , 38F, 2, 18, 2, 0.0F)//Left Strut

    topWingModel = new ModelRendererTurbo[3];
    topWingModel[0] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
    topWingModel[1] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
        topWingModel[2] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
   
        topWingModel[0].addBox(0F, 0F, 0F, 18, 18, 2, 0.0F);    //Top Middle Wing
    topWingModel[0].rotateAngleX = -1.570796F;
    topWingModel[0].setPosition(-9F, -20F, 9F);
   
        topWingModel[1].addBox(0F, 0F , 0F, 18, 41, 2, 0.0F);    //Top Left Wing
    topWingModel[1].rotateAngleX = -1.570796F;
    topWingModel[1].setPosition(-9F, -20F, 50F);
   
        topWingModel[2].addBox(0F, 0F, 0F, 18, 41, 2, 0.0F);    //Top Right Wing
    topWingModel[2].rotateAngleX = -1.570796F;
    topWingModel[2].setPosition(-9F, -20F, -9F);

    tailModel = new ModelRendererTurbo[1];
    tailModel[0] = new ModelRendererTurbo(this, 0, 43, textureX, textureY);
        tailModel[0].addBox(35F, -2F , -5F, 20, 8, 10, 0.0F);    //Tail
       
    tailWheelModel = new ModelRendererTurbo[1];
    tailWheelModel[0] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
    tailWheelModel[0].addBox(44F, 6F, -1F, 4, 4, 2, 0.0F);      //Tail Wheel


    flipAll(); //Call this function to flip everything in X and Y. For correcting old models. 
    }
View Full Code Here

    int textureX = 64;
    int textureY = 64;
   
    gunModel = new ModelRendererTurbo[1];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(4F, -20F, -8F, 1, 32, 16);
   
  }
View Full Code Here

    int textureX = 64;
    int textureY = 32;
   
    bodyModel = new ModelRendererTurbo[1];
   
    bodyModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    bodyModel[0].addBox(-5F, 0F, -3F, 10, 12, 6);
   
    skirtFrontModel = new ModelRendererTurbo[1];
   
    skirtFrontModel[0] = new ModelRendererTurbo(this, 32, 0, textureX, textureY);
    skirtFrontModel[0].addBox(-5F, 0F, -3F, 10, 12, 6);
  }
View Full Code Here

    int textureX = 64;
    int textureY = 32;
   
    gunModel = new ModelRendererTurbo[2];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(-1F, -1F, -12F, 2, 2, 24);
   
    gunModel[1] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[1].addBox(-4F, -2F, 12F, 8, 4, 4);
   
    for(int i = 0; i < 2; i++)
      gunModel[i].setRotationPoint(4F, 0F, 0F);
   
View Full Code Here

    int textureX = 64;
    int textureY = 16;
   
    gunModel = new ModelRendererTurbo[6];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(-1F, 3F, -1F, 7, 2, 2);
   
    gunModel[1] = new ModelRendererTurbo(this, 0, 4, textureX, textureY);
    gunModel[1].addBox(6F, 3F, -0.5F, 12, 2, 1);
   
    gunModel[2] = new ModelRendererTurbo(this, 16, 0, textureX, textureY);
    gunModel[2].addBox(15F, 5F, -0.5F, 1, 1, 1);
   
    gunModel[3] = new ModelRendererTurbo(this, 0, 7, textureX, textureY);
    gunModel[3].addBox(-1F, 0F, -1F, 2, 3, 2);
   
    gunModel[4] = new ModelRendererTurbo(this, 18, 0, textureX, textureY);
    gunModel[4].addBox(1F, 2F, -1F, 1, 1, 2);
   
    gunModel[5] = new ModelRendererTurbo(this, 28, 0, textureX, textureY);
    gunModel[5].addBox(1F, 2.5F, -2F, 4, 3, 1);   
   
    //Shotgun Handle
    pumpModel = new ModelRendererTurbo[1];
   
    pumpModel[0] = new ModelRendererTurbo(this, 8, 7, textureX, textureY);
    pumpModel[0].addBox(10F, 2.8F, -1F, 4, 1, 2);
   
    //Scope
    scopeAttachPoint = new Vector3f(3F / 16F, 5F / 16F, 0F);

    //Stock
    defaultStockModel = new ModelRendererTurbo[3];
   
    defaultStockModel[0] = new ModelRendererTurbo(this, 8, 10, textureX, textureY);
    defaultStockModel[0].addBox(-8F, 0F, -1F, 3, 3, 2);
   
    defaultStockModel[1] = new ModelRendererTurbo(this, 0, 12, textureX, textureY);
    defaultStockModel[1].addBox(-5F, 1F, -1F, 2, 2, 2);
   
    defaultStockModel[2] = new ModelRendererTurbo(this, 18, 12, textureX, textureY);
    defaultStockModel[2].addBox(-3F, 2F, -1F, 2, 2, 2);
   
    stockAttachPoint = new Vector3f(1F / 16F, 4F / 16F, 0F);
   
    //Barrel   
    barrelAttachPoint = new Vector3f(18F / 16F, 4F / 16F, 0F);
   
    //Grip
    gripAttachPoint = new Vector3f(12F / 16F, 3F / 16F, 0F);
   
    //Ammo
    ammoModel = new ModelRendererTurbo[1];
   
    ammoModel[0] = new ModelRendererTurbo(this, 22, 0, textureX, textureY);
    ammoModel[0].addBox(4F, 3.5F, -0.5F, 2, 1, 1);
     
    gunSlideDistance = 0.5F;
    animationType = EnumAnimationType.SHOTGUN;
    pumpDelayAfterReload = 65;
View Full Code Here

    int textureY = 64//The height of the texture
 
    //The propeller
    //All pieces may be identical. The renderer handles the rotation of the blades relative to each other
    propellerModels = new ModelRendererTurbo[1][3];
        propellerModels[0][0] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 0 : 56, 8 is the texture origin
        propellerModels[0][1] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 1
        propellerModels[0][2] = new ModelRendererTurbo(this, 56, 8, textureX, textureY); //Propeller 0 - Blade 2 
        propellerModels[0][0].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)//Model the propeller blade by adding a box
        propellerModels[0][1].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)//First come the origin coordinates and then the size
        propellerModels[0][2].addBox(-1F, 2F, -1F, 2, 5, 2, 0.0F)
    //Set the origin around which the propeller rotates
        propellerModels[0][0].setRotationPoint(-14, 0, 0)
        propellerModels[0][1].setRotationPoint(-14, 0, 0)
        propellerModels[0][2].setRotationPoint(-14, 0, 0)
   
    //Yaw flap
    yawFlapModel = new ModelRendererTurbo[1];
    yawFlapModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
        yawFlapModel[0].addBox(0F, 0F , 0F, 10, 10, 2, 0.0F)
    yawFlapModel[0].setPosition(40F, -12F, -1F);     

    //Left pitch flap
    pitchFlapLeftModel = new ModelRendererTurbo[1];
    pitchFlapLeftModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
    pitchFlapLeftModel[0].addBox(0F, 0F , 0F, 10, 15, 2, 0.0F);
        pitchFlapLeftModel[0].rotateAngleX = pi / 2;
    pitchFlapLeftModel[0].setPosition(40F, 3F, -15F);
   
    //Right pitch flap
    pitchFlapRightModel = new ModelRendererTurbo[1];
    pitchFlapRightModel[0] = new ModelRendererTurbo(this, 104, 0, textureX, textureY);
    pitchFlapRightModel[0].addBox(0F, 0F , 0F, 10, 15, 2, 0.0F);
        pitchFlapRightModel[0].rotateAngleX = pi / 2;
    pitchFlapRightModel[0].setPosition(40F, 3F, 0F);
   
    //Front wheels with struts
    bodyWheelModel = new ModelRendererTurbo[4];
    bodyWheelModel[0] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
    bodyWheelModel[1] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
      bodyWheelModel[2] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      bodyWheelModel[3] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);

        bodyWheelModel[0].addBox(-4F, 11F, 5F, 4, 4, 2, 0.0F);    //Left wheel
    bodyWheelModel[1].addBox(-4F, 11F, -7F, 4, 4, 2, 0.0F);    //Right wheel
    bodyWheelModel[2].addBox(-3F, 6F , 5F, 2, 5, 2, 0.0F);    //Left Strut   
    bodyWheelModel[3].addBox(-3F, 6F , -7F, 2, 5, 2, 0.0F);    //Right Strut

    //Defining lots of texture origins for the body model
    bodyModel = new ModelRendererTurbo[6];
        bodyModel[0] = new ModelRendererTurbo(this, 0, 8, textureX, textureY);
        bodyModel[1] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[2] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[3] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[4] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
        bodyModel[5] = new ModelRendererTurbo(this, 44, 0, textureX, textureY);

    //Old boat code. A bit messy, but don't feel like re-writing
        byte length = 24;
        byte sidePieceHeight = 6;
        byte width = 20;
        byte boatDepth = 4;
        bodyModel[0].addBox(-length / 2, -width / 2 + 2, -3F, length, width - 4, 4, 0.0F);
        bodyModel[0].setPosition(0.0F, 0 + boatDepth, 0.0F);
        bodyModel[1].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[1].setPosition(-length / 2 + 1, 0 + boatDepth, 0.0F);
        bodyModel[2].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[2].setPosition(length / 2 - 1, 0 + boatDepth, 0.0F);
        bodyModel[3].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[3].setPosition(0.0F, 0 + boatDepth, -width / 2 + 1);
        bodyModel[4].addBox(-length / 2 + 2, -sidePieceHeight - 1, -1F, length - 4, sidePieceHeight, 2, 0.0F);
        bodyModel[4].setPosition(0.0F, 0 + boatDepth, width / 2 - 1);
    bodyModel[5].addBox(0F, 0F , 0F, 4, 4, 4, 0.0F);    //Propeller Centre
    bodyModel[5].setPosition(-15F, -2F, -2F);

        bodyModel[0].rotateAngleX = pi / 2;
        bodyModel[1].rotateAngleY = 3 * pi / 2;
        bodyModel[2].rotateAngleY = pi / 2;
        bodyModel[3].rotateAngleY = pi;

    //Right wing
    rightWingModel = new ModelRendererTurbo[5]
    rightWingModel[0] = new ModelRendererTurbo(this, 64 , 0, textureX, textureY);
      rightWingModel[1] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      rightWingModel[2] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      rightWingModel[3] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      rightWingModel[4] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);

        rightWingModel[0].addBox(0F, 0F, 0F, 18, 41, 2, 0.0F);
    rightWingModel[0].rotateAngleX = -pi / 2;
    rightWingModel[0].setPosition(-9F, 0F, -9F);
    rightWingModel[1].addBox(-7F, -18F , -40F, 2, 18, 2, 0.0F);
    rightWingModel[2].addBox(5F, -18F , -40F, 2, 18, 2, 0.0F);
    rightWingModel[3].addBox(-7F, -18F , -16F, 2, 18, 2, 0.0F);
    rightWingModel[4].addBox(5F, -18F , -16F, 2, 18, 2, 0.0F);

    //Left wing
    leftWingModel = new ModelRendererTurbo[5];
        leftWingModel[0] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
      leftWingModel[1] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      leftWingModel[2] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      leftWingModel[3] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
      leftWingModel[4] = new ModelRendererTurbo(this, 56, 15, textureX, textureY);
     
        leftWingModel[0].addBox(0F, 0F , 0F, 18, 41, , 0.0F);
    leftWingModel[0].rotateAngleX = -pi / 2;
    leftWingModel[0].setPosition(-9F, 0F, 50F);
    leftWingModel[1].addBox(-7F, -18F , 38F, 2, 18, 2, 0.0F)
    leftWingModel[2].addBox(5F, -18F , 38F, 2, 18, 2, 0.0F)
    leftWingModel[3].addBox(-7F, -18F , 14F, 2, 18, 2, 0.0F)
    leftWingModel[4].addBox(5F, -18F , 14F, 2, 18, 2, 0.0F)

    //Top wing (in 3 parts)
    topWingModel = new ModelRendererTurbo[3];
    topWingModel[0] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
    topWingModel[1] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
        topWingModel[2] = new ModelRendererTurbo(this, 64, 0, textureX, textureY);
   
        topWingModel[0].addBox(0F, 0F, 0F, 18, 18, 2, 0.0F);    //Top Middle Wing
    topWingModel[0].rotateAngleX = -pi / 2;
    topWingModel[0].setPosition(-9F, -20F, 9F);
 
        topWingModel[1].addBox(0F, 0F , 0F, 18, 41, 2, 0.0F);    //Top Left Wing
    topWingModel[1].rotateAngleX = -pi / 2;
    topWingModel[1].setPosition(-9F, -20F, 50F);
   
        topWingModel[2].addBox(0F, 0F, 0F, 18, 41, 2, 0.0F);    //Top Right Wing
    topWingModel[2].rotateAngleX = -pi / 2;
    topWingModel[2].setPosition(-9F, -20F, -9F);

    //Tail
    tailModel = new ModelRendererTurbo[1];
    tailModel[0] = new ModelRendererTurbo(this, 0, 43, textureX, textureY);
        tailModel[0].addBox(11F, -2F , -5F, 40, 8, 10, 0.0F);
   
    //Tail wheel
    tailWheelModel = new ModelRendererTurbo[1];
    tailWheelModel[0] = new ModelRendererTurbo(this, 0, 32, textureX, textureY);
    tailWheelModel[0].addBox(44F, 6F, -1F, 4, 4, 2, 0.0F);


    flipAll(); //Call this function to flip everything in X and Y. For correcting old models.
    }
View Full Code Here

    int textureX = 64;
    int textureY = 16;
   
    gunModel = new ModelRendererTurbo[6];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(-1F, 2F, -1F, 7, 3, 2);
   
    gunModel[1] = new ModelRendererTurbo(this, 32, 4, textureX, textureY);
    gunModel[1].addBox(0F, -1F, -1F, 1, 3, 2);
   
    gunModel[2] = new ModelRendererTurbo(this, 20, 0, textureX, textureY);
    gunModel[2].addBox(1F, 1F, -1F, 1, 1, 2);
   
    gunModel[3] = new ModelRendererTurbo(this, 0, 5, textureX, textureY);
    gunModel[3].addBox(6F, 3F, -1F, 5, 2, 2);
   
    gunModel[4] = new ModelRendererTurbo(this, 12, 14, textureX, textureY);
    gunModel[4].addBox(12F, 4.5F, -0.5F, 1, 1, 1);
   
    gunModel[5] = new ModelRendererTurbo(this, 0, 9, textureX, textureY);
    gunModel[5].addBox(6F, 3.5F, -0.5F, 10, 1, 1);
   
    //Scope
    scopeAttachPoint = new Vector3f(3.5F / 16F, 5F / 16F, 0F);
   
    //Stock
    defaultStockModel = new ModelRendererTurbo[3];
   
    defaultStockModel[0] = new ModelRendererTurbo(this, 20, 3, textureX, textureY);
    defaultStockModel[0].addBox(-8F, 1F, -1F, 2, 4, 2);
   
    defaultStockModel[1] = new ModelRendererTurbo(this, 0, 11, textureX, textureY);
    defaultStockModel[1].addBox(-6F, 2F, -1F, 2, 3, 2);
   
    defaultStockModel[2] = new ModelRendererTurbo(this, 10, 11, textureX, textureY);
    defaultStockModel[2].addBox(-4F, 3.5F, -0.5F, 3, 1, 1);
   
    stockAttachPoint = new Vector3f(1F / 16F, 4F / 16F, 0F);
   
    //Barrel   
    barrelAttachPoint = new Vector3f(16F / 16F, 4F / 16F, 0F);
   
    //Grip
    gripAttachPoint = new Vector3f(10F / 16F, 3F / 16F, 0F);
   
    defaultGripModel = new ModelRendererTurbo[2];
   
    defaultGripModel[0] = new ModelRendererTurbo(this, 30, 0, textureX, textureY);
    defaultGripModel[0].addBox(7.5F, 2F, -1F, 2, 1, 2);
   
    defaultGripModel[1] = new ModelRendererTurbo(this, 38, 0, textureX, textureY);
    defaultGripModel[1].addBox(8F, 0F, -0.5F, 1, 2, 1);
   
    //Ammo
    ammoModel = new ModelRendererTurbo[2];
   
    ammoModel[0] = new ModelRendererTurbo(this, 20, 11, textureX, textureY);
    ammoModel[0].addBox(3F, 0F, -1F, 3, 2, 2);
   
    ammoModel[1] = new ModelRendererTurbo(this, 30, 11, textureX, textureY);
    ammoModel[1].addBox(4F, -2F, -1F, 3, 2, 2);
   
    gunSlideDistance = 0.5F;
    animationType = EnumAnimationType.BOTTOM_CLIP;
  }
View Full Code Here

    int textureX = 64;
    int textureY = 64;
   
    gunModel = new ModelRendererTurbo[5];
   
    gunModel[0] = new ModelRendererTurbo(this, 0, 0, textureX, textureY);
    gunModel[0].addBox(0F, -4F, -3F, 8, 6, 6);
   
    gunModel[1] = new ModelRendererTurbo(this, 22, 0, textureX, textureY);
    gunModel[1].addBox(1F, -4F, 3F, 6, 3, 3);
   
    gunModel[2] = new ModelRendererTurbo(this, 28, 6, textureX, textureY);
    gunModel[2].addBox(7F, 2F, -3F, 1, 3, 1);
   
    gunModel[3] = new ModelRendererTurbo(this, 32, 6, textureX, textureY);
    gunModel[3].addBox(7F, 2F, 2F, 1, 3, 1);
   
    gunModel[4] = new ModelRendererTurbo(this, 36, 6, textureX, textureY);
    gunModel[4].addBox(7F, 5F, -2F, 1, 1, 4);
   
    ammoModel = new ModelRendererTurbo[1];
   
    ammoModel[0] = new ModelRendererTurbo(this, 0, 46, textureX, textureY);
    ammoModel[0].addBox(1F, -3F, -7F, 6, 4, 4);
   
    minigunBarrelModel = new ModelRendererTurbo[12];
   
    //Barrels
    for(int i = 0; i < 6; i++)
    {
      minigunBarrelModel[i] = new ModelRendererTurbo(this, 0, 16 + 2 * i, textureX, textureY);
      minigunBarrelModel[i].addBox(12F, 1F, -0.5F, 28, 1, 1);
      minigunBarrelModel[i].rotateAngleX = i * (float)Math.PI / 3F;
      minigunBarrelModel[i].setRotationPoint(0F, -1F, 0F);
    }
   
    minigunBarrelModel[6] = new ModelRendererTurbo(this, 0, 28, textureX, textureY);
    minigunBarrelModel[6].addShapeBox(8F, 0F, -3F, 4, 3, 6, 0F, /* 0 */ 0F, 0F, 0F, /* 1 */ 0F, 0F, 0F, /* 2 */ 0F, 0F, 0F, /* 3 */ 0F, 0F, 0F, /* 4 */ 0F, -0.5F, -1.5F, /* 5 */ 0F, -0.5F, -1.5F, /* 6 */ 0F, -0.5F, -1.5F, /* 7 */ 0F, -0.5F, -1.5F);
    minigunBarrelModel[6].setRotationPoint(0F, -1F, 0F);
   
    minigunBarrelModel[7] = new ModelRendererTurbo(this, 20, 28, textureX, textureY);
    minigunBarrelModel[7].addShapeBox(8F, -3F, -3F, 4, 3, 6, 0F, /* 0 */ 0F, -0.5F, -1.5F, /* 1 */ 0F, -0.5F, -1.5F, /* 2 */ 0F, -0.5F, -1.5F, /* 3 */ 0F, -0.5F, -1.5F, /* 4 */ 0F, 0F, 0F, /* 5 */ 0F, 0F, 0F, /* 6 */ 0F, 0F, 0F, /* 7 */ 0F, 0F, 0F);
    minigunBarrelModel[7].setRotationPoint(0F, -1F, 0F);
     
    minigunBarrelModel[8] = new ModelRendererTurbo(this, 0, 37, textureX, textureY);
    minigunBarrelModel[8].addShapeBox(28F, 0F, -3F, 2, 3, 6, 0F, /* 0 */ 0F, 0F, 0F, /* 1 */ 0F, 0F, 0F, /* 2 */ 0F, 0F, 0F, /* 3 */ 0F, 0F, 0F, /* 4 */ 0F, -0.5F, -1.5F, /* 5 */ 0F, -0.5F, -1.5F, /* 6 */ 0F, -0.5F, -1.5F, /* 7 */ 0F, -0.5F, -1.5F);
    minigunBarrelModel[8].setRotationPoint(0F, -1F, 0F);
   
    minigunBarrelModel[9] = new ModelRendererTurbo(this, 16, 37, textureX, textureY);
    minigunBarrelModel[9].addShapeBox(28F, -3F, -3F, 2, 3, 6, 0F, /* 0 */ 0F, -0.5F, -1.5F, /* 1 */ 0F, -0.5F, -1.5F, /* 2 */ 0F, -0.5F, -1.5F, /* 3 */ 0F, -0.5F, -1.5F, /* 4 */ 0F, 0F, 0F, /* 5 */ 0F, 0F, 0F, /* 6 */ 0F, 0F, 0F, /* 7 */ 0F, 0F, 0F);
    minigunBarrelModel[9].setRotationPoint(0F, -1F, 0F);
   
    minigunBarrelModel[10] = new ModelRendererTurbo(this, 32, 37, textureX, textureY);
    minigunBarrelModel[10].addShapeBox(36F, 0F, -3F, 2, 3, 6, 0F, /* 0 */ 0F, 0F, 0F, /* 1 */ 0F, 0F, 0F, /* 2 */ 0F, 0F, 0F, /* 3 */ 0F, 0F, 0F, /* 4 */ 0F, -0.5F, -1.5F, /* 5 */ 0F, -0.5F, -1.5F, /* 6 */ 0F, -0.5F, -1.5F, /* 7 */ 0F, -0.5F, -1.5F);
    minigunBarrelModel[10].setRotationPoint(0F, -1F, 0F);
   
    minigunBarrelModel[11] = new ModelRendererTurbo(this, 48, 37, textureX, textureY);
    minigunBarrelModel[11].addShapeBox(36F, -3F, -3F, 2, 3, 6, 0F, /* 0 */ 0F, -0.5F, -1.5F, /* 1 */ 0F, -0.5F, -1.5F, /* 2 */ 0F, -0.5F, -1.5F, /* 3 */ 0F, -0.5F, -1.5F, /* 4 */ 0F, 0F, 0F, /* 5 */ 0F, 0F, 0F, /* 6 */ 0F, 0F, 0F, /* 7 */ 0F, 0F, 0F);
    minigunBarrelModel[11].setRotationPoint(0F, -1F, 0F);
   
    minigunBarrelOrigin = new Vector3f(8F / 16F, -1F / 16F, 0F);
   
View Full Code Here

TOP

Related Classes of com.flansmod.client.tmt.ModelRendererTurbo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.