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