@Override
 protected void setTextureOffset(String par1Str, int par2, int par3) {
   // if (master != null) master.setTextureOffset(par1Str, par2, par3);
   super.setTextureOffset(par1Str, par2, par3);
 }
 public void superSetTextureOffset(String par1Str, int par2, int par3) {
   super.setTextureOffset(par1Str, par2, par3);
 }
 @Override
 public void setLivingAnimations(
     EntityLivingBase entityLivingBase, float par2, float par3, float par4) {
   if (master != null) master.setLivingAnimations(entityLivingBase, par2, par3, par4);
   else super.setLivingAnimations(entityLivingBase, par2, par3, par4);
 }
 public void superSetLivingAnimations(
     Object entityLivingBase, float par2, float par3, float par4) {
   super.setLivingAnimations((EntityLivingBase) entityLivingBase, par2, par3, par4);
 }
 @Override
 public void setRotationAngles(
     float par1, float par2, float par3, float par4, float par5, float par6, Entity entity) {
   if (master != null) master.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
   else super.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
 }
 public void superSetRotationAngles(
     float par1, float par2, float par3, float par4, float par5, float par6, Object entity) {
   super.setRotationAngles(par1, par2, par3, par4, par5, par6, (Entity) entity);
 }
 @Override
 public void render(
     Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) {
   if (master != null) master.render(entity, par2, par3, par4, par5, par6, par7);
   else super.render(entity, par2, par3, par4, par5, par6, par7);
 }
 public void superRender(
     Object entity, float par2, float par3, float par4, float par5, float par6, float par7) {
   super.render((Entity) entity, par2, par3, par4, par5, par6, par7);
 }
 @Override
 public void renderCloak(float par1) {
   if (master != null) master.renderCloak(par1);
   else super.renderCloak(par1);
 }
Beispiel #10
0
 public void superRenderCloak(float par1) {
   super.renderCloak(par1);
 }
Beispiel #11
0
 public void superRenderEars(float par1) {
   super.renderEars(par1);
 }
  public void renderPlayer(
      EntityPlayer par1EntityPlayer,
      double par2,
      double par4,
      double par6,
      float par8,
      float par9) {
    ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem();
    modelArmorChestplate.heldItemRight =
        modelArmor.heldItemRight = modelBipedMain.heldItemRight = itemstack == null ? 0 : 1;

    if (itemstack != null && par1EntityPlayer.getItemInUseCount() > 0) {
      EnumAction enumaction = itemstack.getItemUseAction();

      if (enumaction == EnumAction.block) {
        modelArmorChestplate.heldItemRight =
            modelArmor.heldItemRight = modelBipedMain.heldItemRight = 3;
      } else if (enumaction == EnumAction.bow) {
        modelArmorChestplate.aimedBow = modelArmor.aimedBow = modelBipedMain.aimedBow = true;
      }
    }

    modelArmorChestplate.isSneak =
        modelArmor.isSneak = modelBipedMain.isSneak = par1EntityPlayer.isSneaking();
    double d = par4 - (double) par1EntityPlayer.yOffset;

    if (par1EntityPlayer.isSneaking() && !(par1EntityPlayer instanceof EntityPlayerSP)) {
      d -= 0.125D;
    }

    super.doRenderLiving(par1EntityPlayer, par2, d, par6, par8, par9);
    modelArmorChestplate.aimedBow = modelArmor.aimedBow = modelBipedMain.aimedBow = false;
    modelArmorChestplate.isSneak = modelArmor.isSneak = modelBipedMain.isSneak = false;
    modelArmorChestplate.heldItemRight =
        modelArmor.heldItemRight = modelBipedMain.heldItemRight = 0;
  }
 public void drawFirstPersonHand() {
   modelBipedMain.onGround = 0.0F;
   modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
   modelBipedMain.bipedRightArm.render(0.0625F);
 }
  /** Method for adding special render rules */
  protected void renderSpecials(EntityPlayer par1EntityPlayer, float par2) {
    super.renderEquippedItems(par1EntityPlayer, par2);
    ItemStack itemstack = par1EntityPlayer.inventory.armorItemInSlot(3);

    if (itemstack != null && itemstack.getItem().shiftedIndex < 256) {
      GL11.glPushMatrix();
      modelBipedMain.bipedHead.postRender(0.0625F);

      if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType())) {
        float f = 0.625F;
        GL11.glTranslatef(0.0F, -0.25F, 0.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(f, -f, f);
      }

      renderManager.itemRenderer.renderItem(par1EntityPlayer, itemstack, 0);
      GL11.glPopMatrix();
    }

    if (par1EntityPlayer.username.equals("deadmau5")
        && loadDownloadableImageTexture(par1EntityPlayer.skinUrl, null)) {
      for (int i = 0; i < 2; i++) {
        float f1 =
            (par1EntityPlayer.prevRotationYaw
                    + (par1EntityPlayer.rotationYaw - par1EntityPlayer.prevRotationYaw) * par2)
                - (par1EntityPlayer.prevRenderYawOffset
                    + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset)
                        * par2);
        float f2 =
            par1EntityPlayer.prevRotationPitch
                + (par1EntityPlayer.rotationPitch - par1EntityPlayer.prevRotationPitch) * par2;
        GL11.glPushMatrix();
        GL11.glRotatef(f1, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.375F * (float) (i * 2 - 1), 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.375F, 0.0F);
        GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(-f1, 0.0F, 1.0F, 0.0F);
        float f7 = 1.333333F;
        GL11.glScalef(f7, f7, f7);
        modelBipedMain.renderEars(0.0625F);
        GL11.glPopMatrix();
      }
    }

    if (loadDownloadableImageTexture(par1EntityPlayer.playerCloakUrl, null)) {
      GL11.glPushMatrix();
      GL11.glTranslatef(0.0F, 0.0F, 0.125F);
      double d =
          (par1EntityPlayer.field_20066_r
                  + (par1EntityPlayer.field_20063_u - par1EntityPlayer.field_20066_r)
                      * (double) par2)
              - (par1EntityPlayer.prevPosX
                  + (par1EntityPlayer.posX - par1EntityPlayer.prevPosX) * (double) par2);
      double d1 =
          (par1EntityPlayer.field_20065_s
                  + (par1EntityPlayer.field_20062_v - par1EntityPlayer.field_20065_s)
                      * (double) par2)
              - (par1EntityPlayer.prevPosY
                  + (par1EntityPlayer.posY - par1EntityPlayer.prevPosY) * (double) par2);
      double d2 =
          (par1EntityPlayer.field_20064_t
                  + (par1EntityPlayer.field_20061_w - par1EntityPlayer.field_20064_t)
                      * (double) par2)
              - (par1EntityPlayer.prevPosZ
                  + (par1EntityPlayer.posZ - par1EntityPlayer.prevPosZ) * (double) par2);
      float f10 =
          par1EntityPlayer.prevRenderYawOffset
              + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset) * par2;
      double d3 = MathHelper.sin((f10 * (float) Math.PI) / 180F);
      double d4 = -MathHelper.cos((f10 * (float) Math.PI) / 180F);
      float f12 = (float) d1 * 10F;

      if (f12 < -6F) {
        f12 = -6F;
      }

      if (f12 > 32F) {
        f12 = 32F;
      }

      float f13 = (float) (d * d3 + d2 * d4) * 100F;
      float f14 = (float) (d * d4 - d2 * d3) * 100F;

      if (f13 < 0.0F) {
        f13 = 0.0F;
      }

      float f15 =
          par1EntityPlayer.prevCameraYaw
              + (par1EntityPlayer.cameraYaw - par1EntityPlayer.prevCameraYaw) * par2;
      f12 +=
          MathHelper.sin(
                  (par1EntityPlayer.prevDistanceWalkedModified
                          + (par1EntityPlayer.distanceWalkedModified
                                  - par1EntityPlayer.prevDistanceWalkedModified)
                              * par2)
                      * 6F)
              * 32F
              * f15;

      if (par1EntityPlayer.isSneaking()) {
        f12 += 25F;
      }

      GL11.glRotatef(6F + f13 / 2.0F + f12, 1.0F, 0.0F, 0.0F);
      GL11.glRotatef(f14 / 2.0F, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(-f14 / 2.0F, 0.0F, 1.0F, 0.0F);
      GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
      modelBipedMain.renderCloak(0.0625F);
      GL11.glPopMatrix();
    }

    ItemStack itemstack1 = par1EntityPlayer.inventory.getCurrentItem();

    if (itemstack1 != null) {
      GL11.glPushMatrix();
      modelBipedMain.bipedRightArm.postRender(0.0625F);
      GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);

      if (par1EntityPlayer.fishEntity != null) {
        itemstack1 = new ItemStack(Item.stick);
      }

      EnumAction enumaction = null;

      if (par1EntityPlayer.getItemInUseCount() > 0) {
        enumaction = itemstack1.getItemUseAction();
      }

      if (itemstack1.itemID < 256
          && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) {
        float f3 = 0.5F;
        GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
        f3 *= 0.75F;
        GL11.glRotatef(20F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(f3, -f3, f3);
      } else if (itemstack1.itemID == Item.bow.shiftedIndex) {
        float f4 = 0.625F;
        GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
        GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
        GL11.glScalef(f4, -f4, f4);
        GL11.glRotatef(-100F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F);
      } else if (Item.itemsList[itemstack1.itemID].isFull3D()) {
        float f5 = 0.625F;

        if (Item.itemsList[itemstack1.itemID].shouldRotateAroundWhenRendering()) {
          GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
          GL11.glTranslatef(0.0F, -0.125F, 0.0F);
        }

        if (par1EntityPlayer.getItemInUseCount() > 0 && enumaction == EnumAction.block) {
          GL11.glTranslatef(0.05F, 0.0F, -0.1F);
          GL11.glRotatef(-50F, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(-10F, 1.0F, 0.0F, 0.0F);
          GL11.glRotatef(-60F, 0.0F, 0.0F, 1.0F);
        }

        GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
        GL11.glScalef(f5, -f5, f5);
        GL11.glRotatef(-100F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F);
      } else {
        float f6 = 0.375F;
        GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
        GL11.glScalef(f6, f6, f6);
        GL11.glRotatef(60F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(-90F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
      }

      if (itemstack1.getItem().func_46058_c()) {
        for (int j = 0; j <= 1; j++) {
          int k = itemstack1.getItem().getColorFromDamage(itemstack1.getItemDamage(), j);
          float f8 = (float) (k >> 16 & 0xff) / 255F;
          float f9 = (float) (k >> 8 & 0xff) / 255F;
          float f11 = (float) (k & 0xff) / 255F;
          GL11.glColor4f(f8, f9, f11, 1.0F);
          renderManager.itemRenderer.renderItem(par1EntityPlayer, itemstack1, j);
        }
      } else {
        renderManager.itemRenderer.renderItem(par1EntityPlayer, itemstack1, 0);
      }

      GL11.glPopMatrix();
    }
  }
Beispiel #15
0
  /** Set the specified armor model as the player model. Args: player, armorSlot, partialTick */
  protected int setArmorModel(EntityPlayer par1EntityPlayer, int par2, float par3) {
    ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3 - par2);

    if (var4 != null) {
      Item var5 = var4.getItem();

      if (var5 instanceof ItemArmor) {
        ItemArmor var6 = (ItemArmor) var5;
        this.loadTexture(
            "/armor/" + armorFilenamePrefix[var6.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png");
        // Spout Start
        VIP vip = par1EntityPlayer.vip;
        int armorId = (par2 == 2 ? 2 : 1);
        if (vip != null && vip.getArmor(armorId) != null) {
          String url = vip.getArmor(armorId);
          if (!this.loadDownloadableImageTexture(url, (String) null)) {
            Minecraft.theMinecraft.renderEngine.obtainImageData(url, new HDImageBufferDownload());
          }
        }
        // Spout End
        ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
        var7.bipedHead.showModel = par2 == 0;
        var7.bipedHeadwear.showModel = par2 == 0;
        var7.bipedBody.showModel = par2 == 1 || par2 == 2;
        var7.bipedRightArm.showModel = par2 == 1;
        var7.bipedLeftArm.showModel = par2 == 1;
        var7.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
        var7.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
        this.setRenderPassModel(var7);

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

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

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

        float var8 = 1.0F;

        if (var6.getArmorMaterial() == EnumArmorMaterial.CLOTH) {
          int var9 = var6.getColor(var4);
          float var10 = (float) (var9 >> 16 & 255) / 255.0F;
          float var11 = (float) (var9 >> 8 & 255) / 255.0F;
          float var12 = (float) (var9 & 255) / 255.0F;
          GL11.glColor3f(var8 * var10, var8 * var11, var8 * var12);

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

          return 16;
        }

        GL11.glColor3f(var8, var8, var8);

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

        return 1;
      }
    }

    return -1;
  }