Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
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;
  }