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