    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import net.minecraft.client.Minecraft;
    006    import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
    007    import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
    008    import net.minecraftforge.client.IItemRenderer;
    009    import net.minecraftforge.client.MinecraftForgeClient;
    010    import net.minecraftforge.client.ForgeHooksClient;
    011
    012    import org.lwjgl.opengl.GL11;
    013
    014    @SideOnly(Side.CLIENT)
    015    public class RenderPlayer extends RenderLiving
    016    {
    017        private ModelBiped modelBipedMain;
    018        private ModelBiped modelArmorChestplate;
    019        private ModelBiped modelArmor;
    020        public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"};
    021
    022        public RenderPlayer()
    023        {
    024            super(new ModelBiped(0.0F), 0.5F);
    025            this.modelBipedMain = (ModelBiped)this.mainModel;
    026            this.modelArmorChestplate = new ModelBiped(1.0F);
    027            this.modelArmor = new ModelBiped(0.5F);
    028        }
    029
    030        /**
    031         * Set the specified armor model as the player model. Args: player, armorSlot, partialTick
    032         */
    033        protected int setArmorModel(EntityPlayer par1EntityPlayer, int par2, float par3)
    034        {
    035            ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3 - par2);
    036
    037            if (var4 != null)
    038            {
    039                Item var5 = var4.getItem();
    040
    041                if (var5 instanceof ItemArmor)
    042                {
    043                    ItemArmor var6 = (ItemArmor)var5;
    044                    this.loadTexture(ForgeHooksClient.getArmorTexture(var4, "/armor/" + armorFilenamePrefix[var6.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png"));
    045                    ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
    046                    var7.bipedHead.showModel = par2 == 0;
    047                    var7.bipedHeadwear.showModel = par2 == 0;
    048                    var7.bipedBody.showModel = par2 == 1 || par2 == 2;
    049                    var7.bipedRightArm.showModel = par2 == 1;
    050                    var7.bipedLeftArm.showModel = par2 == 1;
    051                    var7.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
    052                    var7.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
    053                    this.setRenderPassModel(var7);
    054
    055                    if (var7 != null)
    056                    {
    057                        var7.onGround = this.mainModel.onGround;
    058                    }
    059
    060                    if (var7 != null)
    061                    {
    062                        var7.isRiding = this.mainModel.isRiding;
    063                    }
    064
    065                    if (var7 != null)
    066                    {
    067                        var7.isChild = this.mainModel.isChild;
    068                    }
    069
    070                    float var8 = 1.0F;
    071
    072                    if (var6.func_82812_d() == EnumArmorMaterial.CLOTH)
    073                    {
    074                        int var9 = var6.func_82814_b(var4);
    075                        float var10 = (float)(var9 >> 16 & 255) / 255.0F;
    076                        float var11 = (float)(var9 >> 8 & 255) / 255.0F;
    077                        float var12 = (float)(var9 & 255) / 255.0F;
    078                        GL11.glColor3f(var8 * var10, var8 * var11, var8 * var12);
    079
    080                        if (var4.isItemEnchanted())
    081                        {
    082                            return 31;
    083                        }
    084
    085                        return 16;
    086                    }
    087
    088                    GL11.glColor3f(var8, var8, var8);
    089
    090                    if (var4.isItemEnchanted())
    091                    {
    092                        return 15;
    093                    }
    094
    095                    return 1;
    096                }
    097            }
    098
    099            return -1;
    100        }
    101
    102        protected void func_82439_b(EntityPlayer par1EntityPlayer, int par2, float par3)
    103        {
    104            ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3 - par2);
    105
    106            if (var4 != null)
    107            {
    108                Item var5 = var4.getItem();
    109
    110                if (var5 instanceof ItemArmor)
    111                {
    112                    ItemArmor var6 = (ItemArmor)var5;
    113                    this.loadTexture(ForgeHooksClient.getArmorTexture(var4, "/armor/" + armorFilenamePrefix[var6.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png"));
    114                    float var7 = 1.0F;
    115                    GL11.glColor3f(var7, var7, var7);
    116                }
    117            }
    118        }
    119
    120        public void renderPlayer(EntityPlayer par1EntityPlayer, double par2, double par4, double par6, float par8, float par9)
    121        {
    122            float var10 = 1.0F;
    123            GL11.glColor3f(var10, var10, var10);
    124            ItemStack var11 = par1EntityPlayer.inventory.getCurrentItem();
    125            this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = var11 != null ? 1 : 0;
    126
    127            if (var11 != null && par1EntityPlayer.getItemInUseCount() > 0)
    128            {
    129                EnumAction var12 = var11.getItemUseAction();
    130
    131                if (var12 == EnumAction.block)
    132                {
    133                    this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 3;
    134                }
    135                else if (var12 == EnumAction.bow)
    136                {
    137                    this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = true;
    138                }
    139            }
    140
    141            this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = par1EntityPlayer.isSneaking();
    142            double var14 = par4 - (double)par1EntityPlayer.yOffset;
    143
    144            if (par1EntityPlayer.isSneaking() && !(par1EntityPlayer instanceof EntityPlayerSP))
    145            {
    146                var14 -= 0.125D;
    147            }
    148
    149            super.doRenderLiving(par1EntityPlayer, par2, var14, par6, par8, par9);
    150            this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = false;
    151            this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
    152            this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 0;
    153        }
    154
    155        protected void func_82440_a(EntityPlayer par1EntityPlayer, float par2, float par3, float par4, float par5, float par6, float par7)
    156        {
    157            if (!par1EntityPlayer.func_82150_aj())
    158            {
    159                super.renderModel(par1EntityPlayer, par2, par3, par4, par5, par6, par7);
    160            }
    161        }
    162
    163        /**
    164         * Used to render a player's name above their head
    165         */
    166        protected void renderName(EntityPlayer par1EntityPlayer, double par2, double par4, double par6)
    167        {
    168            if (Minecraft.isGuiEnabled() && par1EntityPlayer != this.renderManager.livingPlayer && !par1EntityPlayer.func_82150_aj())
    169            {
    170                float var8 = 1.6F;
    171                float var9 = 0.016666668F * var8;
    172                double var10 = par1EntityPlayer.getDistanceSqToEntity(this.renderManager.livingPlayer);
    173                float var12 = par1EntityPlayer.isSneaking() ? 32.0F : 64.0F;
    174
    175                if (var10 < (double)(var12 * var12))
    176                {
    177                    String var13 = par1EntityPlayer.username;
    178
    179                    if (par1EntityPlayer.isSneaking())
    180                    {
    181                        FontRenderer var14 = this.getFontRendererFromRenderManager();
    182                        GL11.glPushMatrix();
    183                        GL11.glTranslatef((float)par2 + 0.0F, (float)par4 + 2.3F, (float)par6);
    184                        GL11.glNormal3f(0.0F, 1.0F, 0.0F);
    185                        GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    186                        GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    187                        GL11.glScalef(-var9, -var9, var9);
    188                        GL11.glDisable(GL11.GL_LIGHTING);
    189                        GL11.glTranslatef(0.0F, 0.25F / var9, 0.0F);
    190                        GL11.glDepthMask(false);
    191                        GL11.glEnable(GL11.GL_BLEND);
    192                        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    193                        Tessellator var15 = Tessellator.instance;
    194                        GL11.glDisable(GL11.GL_TEXTURE_2D);
    195                        var15.startDrawingQuads();
    196                        int var16 = var14.getStringWidth(var13) / 2;
    197                        var15.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
    198                        var15.addVertex((double)(-var16 - 1), -1.0D, 0.0D);
    199                        var15.addVertex((double)(-var16 - 1), 8.0D, 0.0D);
    200                        var15.addVertex((double)(var16 + 1), 8.0D, 0.0D);
    201                        var15.addVertex((double)(var16 + 1), -1.0D, 0.0D);
    202                        var15.draw();
    203                        GL11.glEnable(GL11.GL_TEXTURE_2D);
    204                        GL11.glDepthMask(true);
    205                        var14.drawString(var13, -var14.getStringWidth(var13) / 2, 0, 553648127);
    206                        GL11.glEnable(GL11.GL_LIGHTING);
    207                        GL11.glDisable(GL11.GL_BLEND);
    208                        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    209                        GL11.glPopMatrix();
    210                    }
    211                    else if (par1EntityPlayer.isPlayerSleeping())
    212                    {
    213                        this.renderLivingLabel(par1EntityPlayer, var13, par2, par4 - 1.5D, par6, 64);
    214                    }
    215                    else
    216                    {
    217                        this.renderLivingLabel(par1EntityPlayer, var13, par2, par4, par6, 64);
    218                    }
    219                }
    220            }
    221        }
    222
    223        /**
    224         * Method for adding special render rules
    225         */
    226        protected void renderSpecials(EntityPlayer par1EntityPlayer, float par2)
    227        {
    228            float var3 = 1.0F;
    229            GL11.glColor3f(var3, var3, var3);
    230            super.renderEquippedItems(par1EntityPlayer, par2);
    231            ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3);
    232
    233            if (var4 != null)
    234            {
    235                GL11.glPushMatrix();
    236                this.modelBipedMain.bipedHead.postRender(0.0625F);
    237                float var5;
    238
    239                if (var4 != null && var4.getItem() instanceof ItemBlock)
    240                {
    241                    IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var4, EQUIPPED);
    242                    boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var4, BLOCK_3D));
    243
    244                    if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType()))
    245                    {
    246                        var5 = 0.625F;
    247                        GL11.glTranslatef(0.0F, -0.25F, 0.0F);
    248                        GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
    249                        GL11.glScalef(var5, -var5, -var5);
    250                    }
    251
    252                    this.renderManager.itemRenderer.renderItem(par1EntityPlayer, var4, 0);
    253                }
    254                else if (var4.getItem().shiftedIndex == Item.field_82799_bQ.shiftedIndex)
    255                {
    256                    var5 = 1.0625F;
    257                    GL11.glScalef(var5, -var5, -var5);
    258                    String var6 = "";
    259
    260                    if (var4.hasTagCompound() && var4.getTagCompound().hasKey("SkullOwner"))
    261                    {
    262                        var6 = var4.getTagCompound().getString("SkullOwner");
    263                    }
    264
    265                    TileEntitySkullRenderer.field_82397_a.func_82393_a(-0.5F, 0.0F, -0.5F, 1, 180.0F, var4.getItemDamage(), var6);
    266                }
    267
    268                GL11.glPopMatrix();
    269            }
    270
    271            float var7;
    272
    273            if (par1EntityPlayer.username.equals("deadmau5") && this.loadDownloadableImageTexture(par1EntityPlayer.skinUrl, (String)null))
    274            {
    275                for (int var20 = 0; var20 < 2; ++var20)
    276                {
    277                    float var25 = par1EntityPlayer.prevRotationYaw + (par1EntityPlayer.rotationYaw - par1EntityPlayer.prevRotationYaw) * par2 - (par1EntityPlayer.prevRenderYawOffset + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset) * par2);
    278                    var7 = par1EntityPlayer.prevRotationPitch + (par1EntityPlayer.rotationPitch - par1EntityPlayer.prevRotationPitch) * par2;
    279                    GL11.glPushMatrix();
    280                    GL11.glRotatef(var25, 0.0F, 1.0F, 0.0F);
    281                    GL11.glRotatef(var7, 1.0F, 0.0F, 0.0F);
    282                    GL11.glTranslatef(0.375F * (float)(var20 * 2 - 1), 0.0F, 0.0F);
    283                    GL11.glTranslatef(0.0F, -0.375F, 0.0F);
    284                    GL11.glRotatef(-var7, 1.0F, 0.0F, 0.0F);
    285                    GL11.glRotatef(-var25, 0.0F, 1.0F, 0.0F);
    286                    float var8 = 1.3333334F;
    287                    GL11.glScalef(var8, var8, var8);
    288                    this.modelBipedMain.renderEars(0.0625F);
    289                    GL11.glPopMatrix();
    290                }
    291            }
    292
    293            float var11;
    294
    295            if (this.loadDownloadableImageTexture(par1EntityPlayer.playerCloakUrl, (String)null) && !par1EntityPlayer.func_82150_aj() && !par1EntityPlayer.func_82238_cc())
    296            {
    297                GL11.glPushMatrix();
    298                GL11.glTranslatef(0.0F, 0.0F, 0.125F);
    299                double var22 = par1EntityPlayer.field_71091_bM + (par1EntityPlayer.field_71094_bP - par1EntityPlayer.field_71091_bM) * (double)par2 - (par1EntityPlayer.prevPosX + (par1EntityPlayer.posX - par1EntityPlayer.prevPosX) * (double)par2);
    300                double var24 = par1EntityPlayer.field_71096_bN + (par1EntityPlayer.field_71095_bQ - par1EntityPlayer.field_71096_bN) * (double)par2 - (par1EntityPlayer.prevPosY + (par1EntityPlayer.posY - par1EntityPlayer.prevPosY) * (double)par2);
    301                double var9 = par1EntityPlayer.field_71097_bO + (par1EntityPlayer.field_71085_bR - par1EntityPlayer.field_71097_bO) * (double)par2 - (par1EntityPlayer.prevPosZ + (par1EntityPlayer.posZ - par1EntityPlayer.prevPosZ) * (double)par2);
    302                var11 = par1EntityPlayer.prevRenderYawOffset + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset) * par2;
    303                double var12 = (double)MathHelper.sin(var11 * (float)Math.PI / 180.0F);
    304                double var14 = (double)(-MathHelper.cos(var11 * (float)Math.PI / 180.0F));
    305                float var16 = (float)var24 * 10.0F;
    306
    307                if (var16 < -6.0F)
    308                {
    309                    var16 = -6.0F;
    310                }
    311
    312                if (var16 > 32.0F)
    313                {
    314                    var16 = 32.0F;
    315                }
    316
    317                float var17 = (float)(var22 * var12 + var9 * var14) * 100.0F;
    318                float var18 = (float)(var22 * var14 - var9 * var12) * 100.0F;
    319
    320                if (var17 < 0.0F)
    321                {
    322                    var17 = 0.0F;
    323                }
    324
    325                float var19 = par1EntityPlayer.prevCameraYaw + (par1EntityPlayer.cameraYaw - par1EntityPlayer.prevCameraYaw) * par2;
    326                var16 += MathHelper.sin((par1EntityPlayer.prevDistanceWalkedModified + (par1EntityPlayer.distanceWalkedModified - par1EntityPlayer.prevDistanceWalkedModified) * par2) * 6.0F) * 32.0F * var19;
    327
    328                if (par1EntityPlayer.isSneaking())
    329                {
    330                    var16 += 25.0F;
    331                }
    332
    333                GL11.glRotatef(6.0F + var17 / 2.0F + var16, 1.0F, 0.0F, 0.0F);
    334                GL11.glRotatef(var18 / 2.0F, 0.0F, 0.0F, 1.0F);
    335                GL11.glRotatef(-var18 / 2.0F, 0.0F, 1.0F, 0.0F);
    336                GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
    337                this.modelBipedMain.renderCloak(0.0625F);
    338                GL11.glPopMatrix();
    339            }
    340
    341            ItemStack var21 = par1EntityPlayer.inventory.getCurrentItem();
    342
    343            if (var21 != null)
    344            {
    345                GL11.glPushMatrix();
    346                this.modelBipedMain.bipedRightArm.postRender(0.0625F);
    347                GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
    348
    349                if (par1EntityPlayer.fishEntity != null)
    350                {
    351                    var21 = new ItemStack(Item.stick);
    352                }
    353
    354                EnumAction var23 = null;
    355
    356                if (par1EntityPlayer.getItemInUseCount() > 0)
    357                {
    358                    var23 = var21.getItemUseAction();
    359                }
    360
    361                IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var21, EQUIPPED);
    362                boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var21, BLOCK_3D));
    363
    364                if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType())))
    365                {
    366                    var7 = 0.5F;
    367                    GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
    368                    var7 *= 0.75F;
    369                    GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
    370                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    371                    GL11.glScalef(var7, -var7, var7);
    372                }
    373                else if (var21.itemID == Item.bow.shiftedIndex)
    374                {
    375                    var7 = 0.625F;
    376                    GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
    377                    GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
    378                    GL11.glScalef(var7, -var7, var7);
    379                    GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
    380                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    381                }
    382                else if (Item.itemsList[var21.itemID].isFull3D())
    383                {
    384                    var7 = 0.625F;
    385
    386                    if (Item.itemsList[var21.itemID].shouldRotateAroundWhenRendering())
    387                    {
    388                        GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
    389                        GL11.glTranslatef(0.0F, -0.125F, 0.0F);
    390                    }
    391
    392                    if (par1EntityPlayer.getItemInUseCount() > 0 && var23 == EnumAction.block)
    393                    {
    394                        GL11.glTranslatef(0.05F, 0.0F, -0.1F);
    395                        GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
    396                        GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F);
    397                        GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F);
    398                    }
    399
    400                    GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
    401                    GL11.glScalef(var7, -var7, var7);
    402                    GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
    403                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    404                }
    405                else
    406                {
    407                    var7 = 0.375F;
    408                    GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
    409                    GL11.glScalef(var7, var7, var7);
    410                    GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
    411                    GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
    412                    GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
    413                }
    414
    415                if (var21.getItem().requiresMultipleRenderPasses())
    416                {
    417                    for (int var27 = 0; var27 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var27)
    418                    {
    419                        int var26 = var21.getItem().func_82790_a(var21, var27);
    420                        float var28 = (float)(var26 >> 16 & 255) / 255.0F;
    421                        float var10 = (float)(var26 >> 8 & 255) / 255.0F;
    422                        var11 = (float)(var26 & 255) / 255.0F;
    423                        GL11.glColor4f(var28, var10, var11, 1.0F);
    424                        this.renderManager.itemRenderer.renderItem(par1EntityPlayer, var21, var27);
    425                    }
    426                }
    427                else
    428                {
    429                    this.renderManager.itemRenderer.renderItem(par1EntityPlayer, var21, 0);
    430                }
    431
    432                GL11.glPopMatrix();
    433            }
    434        }
    435
    436        protected void renderPlayerScale(EntityPlayer par1EntityPlayer, float par2)
    437        {
    438            float var3 = 0.9375F;
    439            GL11.glScalef(var3, var3, var3);
    440        }
    441
    442        public void func_82441_a(EntityPlayer par1EntityPlayer)
    443        {
    444            float var2 = 1.0F;
    445            GL11.glColor3f(var2, var2, var2);
    446            this.modelBipedMain.onGround = 0.0F;
    447            this.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer);
    448            this.modelBipedMain.bipedRightArm.render(0.0625F);
    449        }
    450
    451        /**
    452         * Renders player with sleeping offset if sleeping
    453         */
    454        protected void renderPlayerSleep(EntityPlayer par1EntityPlayer, double par2, double par4, double par6)
    455        {
    456            if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping())
    457            {
    458                super.renderLivingAt(par1EntityPlayer, par2 + (double)par1EntityPlayer.field_71079_bU, par4 + (double)par1EntityPlayer.field_71082_cx, par6 + (double)par1EntityPlayer.field_71089_bV);
    459            }
    460            else
    461            {
    462                super.renderLivingAt(par1EntityPlayer, par2, par4, par6);
    463            }
    464        }
    465
    466        /**
    467         * Rotates the player if the player is sleeping. This method is called in rotateCorpse.
    468         */
    469        protected void rotatePlayer(EntityPlayer par1EntityPlayer, float par2, float par3, float par4)
    470        {
    471            if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping())
    472            {
    473                GL11.glRotatef(par1EntityPlayer.getBedOrientationInDegrees(), 0.0F, 1.0F, 0.0F);
    474                GL11.glRotatef(this.getDeathMaxRotation(par1EntityPlayer), 0.0F, 0.0F, 1.0F);
    475                GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F);
    476            }
    477            else
    478            {
    479                super.rotateCorpse(par1EntityPlayer, par2, par3, par4);
    480            }
    481        }
    482
    483        /**
    484         * Passes the specialRender and renders it
    485         */
    486        protected void passSpecialRender(EntityLiving par1EntityLiving, double par2, double par4, double par6)
    487        {
    488            this.renderName((EntityPlayer)par1EntityLiving, par2, par4, par6);
    489        }
    490
    491        /**
    492         * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
    493         * entityLiving, partialTickTime
    494         */
    495        protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
    496        {
    497            this.renderPlayerScale((EntityPlayer)par1EntityLiving, par2);
    498        }
    499
    500        protected void func_82408_c(EntityLiving par1EntityLiving, int par2, float par3)
    501        {
    502            this.func_82439_b((EntityPlayer)par1EntityLiving, par2, par3);
    503        }
    504
    505        /**
    506         * Queries whether should render the specified pass or not.
    507         */
    508        protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
    509        {
    510            return this.setArmorModel((EntityPlayer)par1EntityLiving, par2, par3);
    511        }
    512
    513        protected void renderEquippedItems(EntityLiving par1EntityLiving, float par2)
    514        {
    515            this.renderSpecials((EntityPlayer)par1EntityLiving, par2);
    516        }
    517
    518        protected void rotateCorpse(EntityLiving par1EntityLiving, float par2, float par3, float par4)
    519        {
    520            this.rotatePlayer((EntityPlayer)par1EntityLiving, par2, par3, par4);
    521        }
    522
    523        /**
    524         * Sets a simple glTranslate on a LivingEntity.
    525         */
    526        protected void renderLivingAt(EntityLiving par1EntityLiving, double par2, double par4, double par6)
    527        {
    528            this.renderPlayerSleep((EntityPlayer)par1EntityLiving, par2, par4, par6);
    529        }
    530
    531        /**
    532         * Renders the model in RenderLiving
    533         */
    534        protected void renderModel(EntityLiving par1EntityLiving, float par2, float par3, float par4, float par5, float par6, float par7)
    535        {
    536            this.func_82440_a((EntityPlayer)par1EntityLiving, par2, par3, par4, par5, par6, par7);
    537        }
    538
    539        public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
    540        {
    541            this.renderPlayer((EntityPlayer)par1EntityLiving, par2, par4, par6, par8, par9);
    542        }
    543
    544        /**
    545         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    546         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    547         * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    548         * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    549         */
    550        public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    551        {
    552            this.renderPlayer((EntityPlayer)par1Entity, par2, par4, par6, par8, par9);
    553        }
    554    }