public void func_78087_a(
     float p_78087_1_,
     float p_78087_2_,
     float p_78087_3_,
     float p_78087_4_,
     float p_78087_5_,
     float p_78087_6_,
     Entity p_78087_7_) {
   super.func_78087_a(
       p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_);
   float var8 = MathHelper.func_76126_a(this.field_78095_p * 3.1415927F);
   float var9 =
       MathHelper.func_76126_a(
           (1.0F - (1.0F - this.field_78095_p) * (1.0F - this.field_78095_p)) * 3.1415927F);
   this.field_78112_f.field_78808_h = 0.0F;
   this.field_78113_g.field_78808_h = 0.0F;
   this.field_78112_f.field_78796_g = -(0.1F - var8 * 0.6F);
   this.field_78113_g.field_78796_g = 0.1F - var8 * 0.6F;
   this.field_78112_f.field_78795_f = -1.5707964F;
   this.field_78113_g.field_78795_f = -1.5707964F;
   this.field_78112_f.field_78795_f -= var8 * 1.2F - var9 * 0.4F;
   this.field_78113_g.field_78795_f -= var8 * 1.2F - var9 * 0.4F;
   this.field_78112_f.field_78808_h += MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
   this.field_78113_g.field_78808_h -= MathHelper.func_76134_b(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
   this.field_78112_f.field_78795_f += MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F;
   this.field_78113_g.field_78795_f -= MathHelper.func_76126_a(p_78087_3_ * 0.067F) * 0.05F;
 }
Beispiel #2
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);
   setRotationAngles(f, f1, f2, f3, f4, f5, entity);
   /*S1.render(f5);
   S2.render(f5);
   S3.render(f5);
   S4.render(f5);
   S5.render(f5);
   S6.render(f5);
   S7.render(f5);
   S8.render(f5);
   S9.render(f5);
   S10.render(f5);
   S11.render(f5);
   S12.render(f5);
   S13.render(f5);
   S14.render(f5);
   S15.render(f5);
   S16.render(f5);
   S17.render(f5);
   S18.render(f5);
   S19.render(f5);
   S20.render(f5);
   S21.render(f5);*/
 }
Beispiel #3
0
 @Override
 public void setRotationAngles(
     float limbSwing,
     float limbSwingAngle,
     float entityTickTime,
     float rotationYaw,
     float rotationPitch,
     float unitPixel,
     Entity entity) {
   super.setRotationAngles(
       limbSwing, limbSwingAngle, entityTickTime, rotationYaw, rotationPitch, unitPixel, entity);
   helmFront.rotateAngleY = bipedHead.rotateAngleY;
   helmFront.rotateAngleX = bipedHead.rotateAngleX;
 }
Beispiel #4
0
 @Override
 public void render(
     Entity entity,
     float limbSwing,
     float limbSwingAngle,
     float entityTickTime,
     float rotationYaw,
     float rotationPitch,
     float unitPixel) {
   super.render(
       entity, limbSwing, limbSwingAngle, entityTickTime, rotationYaw, rotationPitch, unitPixel);
   setRotationAngles(
       limbSwing, limbSwingAngle, entityTickTime, rotationYaw, rotationPitch, unitPixel, entity);
   GL11.glPushMatrix();
   GL11.glScalef(1.2F, 1F, 1.2F);
   helmFront.render(unitPixel);
   GL11.glPopMatrix();
 }
 @Override
 public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
   if (entity.isSneaking()) {
     tank11.rotateAngleX = 0.5F;
     tank12.rotateAngleX = 0.5F;
     tank21.rotateAngleX = 0.5F;
     tank22.rotateAngleX = 0.5F;
     tank31.rotateAngleX = 0.5F;
     tank32.rotateAngleX = 0.5F;
     tank41.rotateAngleX = 0.5F;
     tank42.rotateAngleX = 0.5F;
     strap1.rotateAngleX = 0.5F;
     strap2.rotateAngleX = 0.5F;
     strap3.rotateAngleX = 0.5F;
     pipeleft1.rotateAngleX = 0.5F;
     pipeleft2.rotateAngleX = 0.5F;
     pipeleft3.rotateAngleX = 0.5F;
     piperight1.rotateAngleX = 0.5F;
     piperight2.rotateAngleX = 0.5F;
     piperight3.rotateAngleX = 0.5F;
   } else {
     tank11.rotateAngleX = 0F;
     tank12.rotateAngleX = 0F;
     tank21.rotateAngleX = 0F;
     tank22.rotateAngleX = 0F;
     tank31.rotateAngleX = 0F;
     tank32.rotateAngleX = 0F;
     tank41.rotateAngleX = 0F;
     tank42.rotateAngleX = 0F;
     strap1.rotateAngleX = 0F;
     strap2.rotateAngleX = 0F;
     strap3.rotateAngleX = 0F;
     pipeleft1.rotateAngleX = 0F;
     pipeleft2.rotateAngleX = 0F;
     pipeleft3.rotateAngleX = 0F;
     piperight1.rotateAngleX = 0F;
     piperight2.rotateAngleX = 0F;
     piperight3.rotateAngleX = 0F;
   }
   super.render(entity, f, f1, f2, f3, f4, 0.0525F);
 }
 @Override
 public void setRotationAngles(
     float limbSwing,
     float limbSwingAmount,
     float rotFloat,
     float rotYaw,
     float rotPitch,
     float partTicks,
     Entity entity) {
   super.setRotationAngles(
       limbSwing, limbSwingAmount, rotFloat, rotYaw, rotPitch, partTicks, entity);
   ClaySoldiersMod.EVENT_BUS.post(
       new SoldierRenderEvent.SetRotationAnglesEvent(
           (EntityClayMan) entity,
           this,
           limbSwing,
           limbSwingAmount,
           rotFloat,
           rotYaw,
           rotPitch,
           partTicks));
 }
Beispiel #7
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);
   setRotationAngles(f, f1, f2, f3, f4, f5, entity);
 }
Beispiel #8
0
 public void setRotationAngles(
     float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
   super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
 }
  /** Queries whether should render the specified pass or not. */
  protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3) {
    ItemStack itemstack = par1EntityLiving.getCurrentArmor(3 - par2);

    if (itemstack != null) {
      Item item = itemstack.getItem();

      if (item instanceof ItemArmor) {
        ItemArmor itemarmor = (ItemArmor) item;
        this.loadTexture(
            ForgeHooksClient.getArmorTexture(
                itemstack,
                "/armor/"
                    + bipedArmorFilenamePrefix[itemarmor.renderIndex]
                    + "_"
                    + (par2 == 2 ? 2 : 1)
                    + ".png"));
        ModelBiped modelbiped = par2 == 2 ? this.field_82425_h : this.field_82423_g;
        modelbiped.bipedHead.showModel = par2 == 0;
        modelbiped.bipedHeadwear.showModel = par2 == 0;
        modelbiped.bipedBody.showModel = par2 == 1 || par2 == 2;
        modelbiped.bipedRightArm.showModel = par2 == 1;
        modelbiped.bipedLeftArm.showModel = par2 == 1;
        modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
        modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
        this.setRenderPassModel(modelbiped);

        if (modelbiped != null) {
          modelbiped.onGround = this.mainModel.onGround;
        }

        if (modelbiped != null) {
          modelbiped.isRiding = this.mainModel.isRiding;
        }

        if (modelbiped != null) {
          modelbiped.isChild = this.mainModel.isChild;
        }

        float f1 = 1.0F;

        if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH) {
          int j = itemarmor.getColor(itemstack);
          float f2 = (float) (j >> 16 & 255) / 255.0F;
          float f3 = (float) (j >> 8 & 255) / 255.0F;
          float f4 = (float) (j & 255) / 255.0F;
          GL11.glColor3f(f1 * f2, f1 * f3, f1 * f4);

          if (itemstack.isItemEnchanted()) {
            return 31;
          }

          return 16;
        }

        GL11.glColor3f(f1, f1, f1);

        if (itemstack.isItemEnchanted()) {
          return 15;
        }

        return 1;
      }
    }

    return -1;
  }
  /** Set the specified armor model as the player model. Args: player, armorSlot, partialTick */
  @Override
  protected int setArmorModel(EntityPlayer par1EntityPlayer, int par2, float par3) {
    ItemStack itemstack = par1EntityPlayer.inventory.armorItemInSlot(3 - par2);
    RenderPlayerTFC.armorFilenamePrefix = RenderPlayer.armorFilenamePrefix;

    if (itemstack != null) {
      Item item = itemstack.getItem();

      if (item instanceof ItemArmor) {
        ItemArmor itemarmor = (ItemArmor) item;
        this.loadTexture(
            ForgeHooksClient.getArmorTexture(
                itemstack,
                "/armor/"
                    + armorFilenamePrefix[itemarmor.renderIndex]
                    + "_"
                    + (par2 == 2 ? 2 : 1)
                    + ".png"));
        ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
        modelbiped.bipedHead.showModel = par2 == 0;
        plume.showModel = false; // (itemstack.getItem() == TFCItems.BronzeHelmet);
        plume2.showModel = false; // (itemstack.getItem() == TFCItems.BronzeHelmet);
        HornR1.showModel = false; // (itemstack.getItem() == TFCItems.WroughtIronHelmet);
        HornL1.showModel = false; // (itemstack.getItem() == TFCItems.WroughtIronHelmet);
        modelbiped.bipedHeadwear.showModel =
            par2 == 0
                && (itemstack.getItem() != TFCItems.BronzeHelmet
                    && itemstack.getItem() != TFCItems.WroughtIronHelmet);
        modelbiped.bipedBody.showModel = par2 == 1 || par2 == 2;
        modelbiped.bipedRightArm.showModel = par2 == 1;
        modelbiped.bipedLeftArm.showModel = par2 == 1;
        modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
        modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
        this.setRenderPassModel(modelbiped);

        if (modelbiped != null) {
          modelbiped.onGround = this.mainModel.onGround;
        }

        if (modelbiped != null) {
          modelbiped.isRiding = this.mainModel.isRiding;
        }

        if (modelbiped != null) {
          modelbiped.isChild = this.mainModel.isChild;
        }

        float f1 = 1.0F;

        if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH) {
          int j = itemarmor.getColor(itemstack);
          float f2 = (j >> 16 & 255) / 255.0F;
          float f3 = (j >> 8 & 255) / 255.0F;
          float f4 = (j & 255) / 255.0F;
          GL11.glColor3f(f1 * f2, f1 * f3, f1 * f4);

          if (itemstack.isItemEnchanted()) {
            return 31;
          }

          return 16;
        }

        GL11.glColor3f(f1, f1, f1);

        if (itemstack.isItemEnchanted()) {
          return 15;
        }

        return 1;
      }
    }

    return -1;
  }