    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        /**
    158         * Used to render a player's name above their head
    159         */
    160        protected void renderName(EntityPlayer par1EntityPlayer, double par2, double par4, double par6)
    161        {
    162            if (Minecraft.isGuiEnabled() && par1EntityPlayer != this.renderManager.livingPlayer && !par1EntityPlayer.func_82150_aj())
    163            {
    164                float var8 = 1.6F;
    165                float var9 = 0.016666668F * var8;
    166                double var10 = par1EntityPlayer.getDistanceSqToEntity(this.renderManager.livingPlayer);
    167                float var12 = par1EntityPlayer.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
    168
    169                if (var10 < (double)(var12 * var12))
    170                {
    171                    String var13 = par1EntityPlayer.username;
    172
    173                    if (par1EntityPlayer.isSneaking())
    174                    {
    175                        FontRenderer var14 = this.getFontRendererFromRenderManager();
    176                        GL11.glPushMatrix();
    177                        GL11.glTranslatef((float)par2 + 0.0F, (float)par4 + 2.3F, (float)par6);
    178                        GL11.glNormal3f(0.0F, 1.0F, 0.0F);
    179                        GL11.glRotatef(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    180                        GL11.glRotatef(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    181                        GL11.glScalef(-var9, -var9, var9);
    182                        GL11.glDisable(GL11.GL_LIGHTING);
    183                        GL11.glTranslatef(0.0F, 0.25F / var9, 0.0F);
    184                        GL11.glDepthMask(false);
    185                        GL11.glEnable(GL11.GL_BLEND);
    186                        GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    187                        Tessellator var15 = Tessellator.instance;
    188                        GL11.glDisable(GL11.GL_TEXTURE_2D);
    189                        var15.startDrawingQuads();
    190                        int var16 = var14.getStringWidth(var13) / 2;
    191                        var15.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
    192                        var15.addVertex((double)(-var16 - 1), -1.0D, 0.0D);
    193                        var15.addVertex((double)(-var16 - 1), 8.0D, 0.0D);
    194                        var15.addVertex((double)(var16 + 1), 8.0D, 0.0D);
    195                        var15.addVertex((double)(var16 + 1), -1.0D, 0.0D);
    196                        var15.draw();
    197                        GL11.glEnable(GL11.GL_TEXTURE_2D);
    198                        GL11.glDepthMask(true);
    199                        var14.drawString(var13, -var14.getStringWidth(var13) / 2, 0, 553648127);
    200                        GL11.glEnable(GL11.GL_LIGHTING);
    201                        GL11.glDisable(GL11.GL_BLEND);
    202                        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    203                        GL11.glPopMatrix();
    204                    }
    205                    else if (par1EntityPlayer.isPlayerSleeping())
    206                    {
    207                        this.renderLivingLabel(par1EntityPlayer, var13, par2, par4 - 1.5D, par6, 64);
    208                    }
    209                    else
    210                    {
    211                        this.renderLivingLabel(par1EntityPlayer, var13, par2, par4, par6, 64);
    212                    }
    213                }
    214            }
    215        }
    216
    217        /**
    218         * Method for adding special render rules
    219         */
    220        protected void renderSpecials(EntityPlayer par1EntityPlayer, float par2)
    221        {
    222            float var3 = 1.0F;
    223            GL11.glColor3f(var3, var3, var3);
    224            super.renderEquippedItems(par1EntityPlayer, par2);
    225            super.func_85093_e(par1EntityPlayer, par2);
    226            ItemStack var4 = par1EntityPlayer.inventory.armorItemInSlot(3);
    227
    228            if (var4 != null)
    229            {
    230                GL11.glPushMatrix();
    231                this.modelBipedMain.bipedHead.postRender(0.0625F);
    232                float var5;
    233
    234                if (var4 != null && var4.getItem() instanceof ItemBlock)
    235                {
    236                    IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var4, EQUIPPED);
    237                    boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var4, BLOCK_3D));
    238
    239                    if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType()))
    240                    {
    241                        var5 = 0.625F;
    242                        GL11.glTranslatef(0.0F, -0.25F, 0.0F);
    243                        GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
    244                        GL11.glScalef(var5, -var5, -var5);
    245                    }
    246
    247                    this.renderManager.itemRenderer.renderItem(par1EntityPlayer, var4, 0);
    248                }
    249                else if (var4.getItem().shiftedIndex == Item.skull.shiftedIndex)
    250                {
    251                    var5 = 1.0625F;
    252                    GL11.glScalef(var5, -var5, -var5);
    253                    String var6 = "";
    254
    255                    if (var4.hasTagCompound() && var4.getTagCompound().hasKey("SkullOwner"))
    256                    {
    257                        var6 = var4.getTagCompound().getString("SkullOwner");
    258                    }
    259
    260                    TileEntitySkullRenderer.skullRenderer.func_82393_a(-0.5F, 0.0F, -0.5F, 1, 180.0F, var4.getItemDamage(), var6);
    261                }
    262
    263                GL11.glPopMatrix();
    264            }
    265
    266            float var7;
    267            float var8;
    268
    269            if (par1EntityPlayer.username.equals("deadmau5") && this.loadDownloadableImageTexture(par1EntityPlayer.skinUrl, (String)null))
    270            {
    271                for (int var20 = 0; var20 < 2; ++var20)
    272                {
    273                    float var25 = par1EntityPlayer.prevRotationYaw + (par1EntityPlayer.rotationYaw - par1EntityPlayer.prevRotationYaw) * par2 - (par1EntityPlayer.prevRenderYawOffset + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset) * par2);
    274                    var7 = par1EntityPlayer.prevRotationPitch + (par1EntityPlayer.rotationPitch - par1EntityPlayer.prevRotationPitch) * par2;
    275                    GL11.glPushMatrix();
    276                    GL11.glRotatef(var25, 0.0F, 1.0F, 0.0F);
    277                    GL11.glRotatef(var7, 1.0F, 0.0F, 0.0F);
    278                    GL11.glTranslatef(0.375F * (float)(var20 * 2 - 1), 0.0F, 0.0F);
    279                    GL11.glTranslatef(0.0F, -0.375F, 0.0F);
    280                    GL11.glRotatef(-var7, 1.0F, 0.0F, 0.0F);
    281                    GL11.glRotatef(-var25, 0.0F, 1.0F, 0.0F);
    282                    var8 = 1.3333334F;
    283                    GL11.glScalef(var8, var8, var8);
    284                    this.modelBipedMain.renderEars(0.0625F);
    285                    GL11.glPopMatrix();
    286                }
    287            }
    288
    289            float var11;
    290
    291            if (this.loadDownloadableImageTexture(par1EntityPlayer.playerCloakUrl, (String)null) && !par1EntityPlayer.func_82150_aj() && !par1EntityPlayer.func_82238_cc())
    292            {
    293                GL11.glPushMatrix();
    294                GL11.glTranslatef(0.0F, 0.0F, 0.125F);
    295                double var22 = par1EntityPlayer.field_71091_bM + (par1EntityPlayer.field_71094_bP - par1EntityPlayer.field_71091_bM) * (double)par2 - (par1EntityPlayer.prevPosX + (par1EntityPlayer.posX - par1EntityPlayer.prevPosX) * (double)par2);
    296                double var24 = par1EntityPlayer.field_71096_bN + (par1EntityPlayer.field_71095_bQ - par1EntityPlayer.field_71096_bN) * (double)par2 - (par1EntityPlayer.prevPosY + (par1EntityPlayer.posY - par1EntityPlayer.prevPosY) * (double)par2);
    297                double var9 = par1EntityPlayer.field_71097_bO + (par1EntityPlayer.field_71085_bR - par1EntityPlayer.field_71097_bO) * (double)par2 - (par1EntityPlayer.prevPosZ + (par1EntityPlayer.posZ - par1EntityPlayer.prevPosZ) * (double)par2);
    298                var11 = par1EntityPlayer.prevRenderYawOffset + (par1EntityPlayer.renderYawOffset - par1EntityPlayer.prevRenderYawOffset) * par2;
    299                double var12 = (double)MathHelper.sin(var11 * (float)Math.PI / 180.0F);
    300                double var14 = (double)(-MathHelper.cos(var11 * (float)Math.PI / 180.0F));
    301                float var16 = (float)var24 * 10.0F;
    302
    303                if (var16 < -6.0F)
    304                {
    305                    var16 = -6.0F;
    306                }
    307
    308                if (var16 > 32.0F)
    309                {
    310                    var16 = 32.0F;
    311                }
    312
    313                float var17 = (float)(var22 * var12 + var9 * var14) * 100.0F;
    314                float var18 = (float)(var22 * var14 - var9 * var12) * 100.0F;
    315
    316                if (var17 < 0.0F)
    317                {
    318                    var17 = 0.0F;
    319                }
    320
    321                float var19 = par1EntityPlayer.prevCameraYaw + (par1EntityPlayer.cameraYaw - par1EntityPlayer.prevCameraYaw) * par2;
    322                var16 += MathHelper.sin((par1EntityPlayer.prevDistanceWalkedModified + (par1EntityPlayer.distanceWalkedModified - par1EntityPlayer.prevDistanceWalkedModified) * par2) * 6.0F) * 32.0F * var19;
    323
    324                if (par1EntityPlayer.isSneaking())
    325                {
    326                    var16 += 25.0F;
    327                }
    328
    329                GL11.glRotatef(6.0F + var17 / 2.0F + var16, 1.0F, 0.0F, 0.0F);
    330                GL11.glRotatef(var18 / 2.0F, 0.0F, 0.0F, 1.0F);
    331                GL11.glRotatef(-var18 / 2.0F, 0.0F, 1.0F, 0.0F);
    332                GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
    333                this.modelBipedMain.renderCloak(0.0625F);
    334                GL11.glPopMatrix();
    335            }
    336
    337            ItemStack var21 = par1EntityPlayer.inventory.getCurrentItem();
    338
    339            if (var21 != null)
    340            {
    341                GL11.glPushMatrix();
    342                this.modelBipedMain.bipedRightArm.postRender(0.0625F);
    343                GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
    344
    345                if (par1EntityPlayer.fishEntity != null)
    346                {
    347                    var21 = new ItemStack(Item.stick);
    348                }
    349
    350                EnumAction var23 = null;
    351
    352                if (par1EntityPlayer.getItemInUseCount() > 0)
    353                {
    354                    var23 = var21.getItemUseAction();
    355                }
    356
    357                IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var21, EQUIPPED);
    358                boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var21, BLOCK_3D));
    359
    360                if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType())))
    361                {
    362                    var7 = 0.5F;
    363                    GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
    364                    var7 *= 0.75F;
    365                    GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
    366                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    367                    GL11.glScalef(-var7, -var7, var7);
    368                }
    369                else if (var21.itemID == Item.bow.shiftedIndex)
    370                {
    371                    var7 = 0.625F;
    372                    GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
    373                    GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
    374                    GL11.glScalef(var7, -var7, var7);
    375                    GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
    376                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    377                }
    378                else if (Item.itemsList[var21.itemID].isFull3D())
    379                {
    380                    var7 = 0.625F;
    381
    382                    if (Item.itemsList[var21.itemID].shouldRotateAroundWhenRendering())
    383                    {
    384                        GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
    385                        GL11.glTranslatef(0.0F, -0.125F, 0.0F);
    386                    }
    387
    388                    if (par1EntityPlayer.getItemInUseCount() > 0 && var23 == EnumAction.block)
    389                    {
    390                        GL11.glTranslatef(0.05F, 0.0F, -0.1F);
    391                        GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
    392                        GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F);
    393                        GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F);
    394                    }
    395
    396                    GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
    397                    GL11.glScalef(var7, -var7, var7);
    398                    GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
    399                    GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
    400                }
    401                else
    402                {
    403                    var7 = 0.375F;
    404                    GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
    405                    GL11.glScalef(var7, var7, var7);
    406                    GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
    407                    GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
    408                    GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
    409                }
    410
    411                float var10;
    412                int var27;
    413                float var28;
    414
    415                if (var21.getItem().requiresMultipleRenderPasses())
    416                {
    417                    for (var27 = 0; var27 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var27)
    418                    {
    419                        int var26 = var21.getItem().getColorFromItemStack(var21, var27);
    420                        var28 = (float)(var26 >> 16 & 255) / 255.0F;
    421                        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                    var27 = var21.getItem().getColorFromItemStack(var21, 0);
    430                    var8 = (float)(var27 >> 16 & 255) / 255.0F;
    431                    var28 = (float)(var27 >> 8 & 255) / 255.0F;
    432                    var10 = (float)(var27 & 255) / 255.0F;
    433                    GL11.glColor4f(var8, var28, var10, 1.0F);
    434                    this.renderManager.itemRenderer.renderItem(par1EntityPlayer, var21, 0);
    435                }
    436
    437                GL11.glPopMatrix();
    438            }
    439        }
    440
    441        protected void renderPlayerScale(EntityPlayer par1EntityPlayer, float par2)
    442        {
    443            float var3 = 0.9375F;
    444            GL11.glScalef(var3, var3, var3);
    445        }
    446
    447        public void func_82441_a(EntityPlayer par1EntityPlayer)
    448        {
    449            float var2 = 1.0F;
    450            GL11.glColor3f(var2, var2, var2);
    451            this.modelBipedMain.onGround = 0.0F;
    452            this.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer);
    453            this.modelBipedMain.bipedRightArm.render(0.0625F);
    454        }
    455
    456        /**
    457         * Renders player with sleeping offset if sleeping
    458         */
    459        protected void renderPlayerSleep(EntityPlayer par1EntityPlayer, double par2, double par4, double par6)
    460        {
    461            if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping())
    462            {
    463                super.renderLivingAt(par1EntityPlayer, par2 + (double)par1EntityPlayer.field_71079_bU, par4 + (double)par1EntityPlayer.field_71082_cx, par6 + (double)par1EntityPlayer.field_71089_bV);
    464            }
    465            else
    466            {
    467                super.renderLivingAt(par1EntityPlayer, par2, par4, par6);
    468            }
    469        }
    470
    471        /**
    472         * Rotates the player if the player is sleeping. This method is called in rotateCorpse.
    473         */
    474        protected void rotatePlayer(EntityPlayer par1EntityPlayer, float par2, float par3, float par4)
    475        {
    476            if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping())
    477            {
    478                GL11.glRotatef(par1EntityPlayer.getBedOrientationInDegrees(), 0.0F, 1.0F, 0.0F);
    479                GL11.glRotatef(this.getDeathMaxRotation(par1EntityPlayer), 0.0F, 0.0F, 1.0F);
    480                GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F);
    481            }
    482            else
    483            {
    484                super.rotateCorpse(par1EntityPlayer, par2, par3, par4);
    485            }
    486        }
    487
    488        /**
    489         * Passes the specialRender and renders it
    490         */
    491        protected void passSpecialRender(EntityLiving par1EntityLiving, double par2, double par4, double par6)
    492        {
    493            this.renderName((EntityPlayer)par1EntityLiving, par2, par4, par6);
    494        }
    495
    496        /**
    497         * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
    498         * entityLiving, partialTickTime
    499         */
    500        protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
    501        {
    502            this.renderPlayerScale((EntityPlayer)par1EntityLiving, par2);
    503        }
    504
    505        protected void func_82408_c(EntityLiving par1EntityLiving, int par2, float par3)
    506        {
    507            this.func_82439_b((EntityPlayer)par1EntityLiving, par2, par3);
    508        }
    509
    510        /**
    511         * Queries whether should render the specified pass or not.
    512         */
    513        protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
    514        {
    515            return this.setArmorModel((EntityPlayer)par1EntityLiving, par2, par3);
    516        }
    517
    518        protected void renderEquippedItems(EntityLiving par1EntityLiving, float par2)
    519        {
    520            this.renderSpecials((EntityPlayer)par1EntityLiving, par2);
    521        }
    522
    523        protected void rotateCorpse(EntityLiving par1EntityLiving, float par2, float par3, float par4)
    524        {
    525            this.rotatePlayer((EntityPlayer)par1EntityLiving, par2, par3, par4);
    526        }
    527
    528        /**
    529         * Sets a simple glTranslate on a LivingEntity.
    530         */
    531        protected void renderLivingAt(EntityLiving par1EntityLiving, double par2, double par4, double par6)
    532        {
    533            this.renderPlayerSleep((EntityPlayer)par1EntityLiving, par2, par4, par6);
    534        }
    535
    536        public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
    537        {
    538            this.renderPlayer((EntityPlayer)par1EntityLiving, par2, par4, par6, par8, par9);
    539        }
    540
    541        /**
    542         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    543         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    544         * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    545         * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    546         */
    547        public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    548        {
    549            this.renderPlayer((EntityPlayer)par1Entity, par2, par4, par6, par8, par9);
    550        }
    551    }