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 323 if (itemstack1.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))) 324 { 325 f3 = 0.5F; 326 GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); 327 f3 *= 0.75F; 328 GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); 329 GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); 330 GL11.glScalef(-f3, -f3, f3); 331 } 332 else if (itemstack1.itemID == Item.bow.itemID) 333 { 334 f3 = 0.625F; 335 GL11.glTranslatef(0.0F, 0.125F, 0.3125F); 336 GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F); 337 GL11.glScalef(f3, -f3, f3); 338 GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); 339 GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); 340 } 341 else if (Item.itemsList[itemstack1.itemID].isFull3D()) 342 { 343 f3 = 0.625F; 344 345 if (Item.itemsList[itemstack1.itemID].shouldRotateAroundWhenRendering()) 346 { 347 GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); 348 GL11.glTranslatef(0.0F, -0.125F, 0.0F); 349 } 350 351 if (par1EntityPlayer.getItemInUseCount() > 0 && enumaction == EnumAction.block) 352 { 353 GL11.glTranslatef(0.05F, 0.0F, -0.1F); 354 GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F); 355 GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F); 356 GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F); 357 } 358 359 GL11.glTranslatef(0.0F, 0.1875F, 0.0F); 360 GL11.glScalef(f3, -f3, f3); 361 GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); 362 GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); 363 } 364 else 365 { 366 f3 = 0.375F; 367 GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); 368 GL11.glScalef(f3, f3, f3); 369 GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F); 370 GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F); 371 GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F); 372 } 373 374 float f11; 375 int j; 376 float f12; 377 378 if (itemstack1.getItem().requiresMultipleRenderPasses()) 379 { 380 for (j = 0; j < itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++j) 381 { 382 int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j); 383 f12 = (float)(k >> 16 & 255) / 255.0F; 384 f11 = (float)(k >> 8 & 255) / 255.0F; 385 f6 = (float)(k & 255) / 255.0F; 386 GL11.glColor4f(f12, f11, f6, 1.0F); 387 this.renderManager.itemRenderer.renderItem(par1EntityPlayer, itemstack1, j); 388 } 389 } 390 else 391 { 392 j = itemstack1.getItem().getColorFromItemStack(itemstack1, 0); 393 f4 = (float)(j >> 16 & 255) / 255.0F; 394 f12 = (float)(j >> 8 & 255) / 255.0F; 395 f11 = (float)(j & 255) / 255.0F; 396 GL11.glColor4f(f4, f12, f11, 1.0F); 397 this.renderManager.itemRenderer.renderItem(par1EntityPlayer, itemstack1, 0); 398 } 399 400 GL11.glPopMatrix(); 401 } 402 } 403 404 protected void renderPlayerScale(EntityPlayer par1EntityPlayer, float par2) 405 { 406 float f1 = 0.9375F; 407 GL11.glScalef(f1, f1, f1); 408 } 409 410 protected void func_96450_a(EntityPlayer par1EntityPlayer, double par2, double par4, double par6, String par8Str, float par9, double par10) 411 { 412 if (par10 < 100.0D) 413 { 414 Scoreboard scoreboard = par1EntityPlayer.func_96123_co(); 415 ScoreObjective scoreobjective = scoreboard.func_96539_a(2); 416 417 if (scoreobjective != null) 418 { 419 Score score = scoreboard.func_96529_a(par1EntityPlayer.getEntityName(), scoreobjective); 420 421 if (par1EntityPlayer.isPlayerSleeping()) 422 { 423 this.renderLivingLabel(par1EntityPlayer, score.func_96652_c() + " " + scoreobjective.getDisplayName(), par2, par4 - 1.5D, par6, 64); 424 } 425 else 426 { 427 this.renderLivingLabel(par1EntityPlayer, score.func_96652_c() + " " + scoreobjective.getDisplayName(), par2, par4, par6, 64); 428 } 429 430 par4 += (double)((float)this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F * par9); 431 } 432 } 433 434 super.func_96449_a(par1EntityPlayer, par2, par4, par6, par8Str, par9, par10); 435 } 436 437 public void renderFirstPersonArm(EntityPlayer par1EntityPlayer) 438 { 439 float f = 1.0F; 440 GL11.glColor3f(f, f, f); 441 this.modelBipedMain.onGround = 0.0F; 442 this.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, par1EntityPlayer); 443 this.modelBipedMain.bipedRightArm.render(0.0625F); 444 } 445 446 /** 447 * Renders player with sleeping offset if sleeping 448 */ 449 protected void renderPlayerSleep(EntityPlayer par1EntityPlayer, double par2, double par4, double par6) 450 { 451 if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping()) 452 { 453 super.renderLivingAt(par1EntityPlayer, par2 + (double)par1EntityPlayer.field_71079_bU, par4 + (double)par1EntityPlayer.field_71082_cx, par6 + (double)par1EntityPlayer.field_71089_bV); 454 } 455 else 456 { 457 super.renderLivingAt(par1EntityPlayer, par2, par4, par6); 458 } 459 } 460 461 /** 462 * Rotates the player if the player is sleeping. This method is called in rotateCorpse. 463 */ 464 protected void rotatePlayer(EntityPlayer par1EntityPlayer, float par2, float par3, float par4) 465 { 466 if (par1EntityPlayer.isEntityAlive() && par1EntityPlayer.isPlayerSleeping()) 467 { 468 GL11.glRotatef(par1EntityPlayer.getBedOrientationInDegrees(), 0.0F, 1.0F, 0.0F); 469 GL11.glRotatef(this.getDeathMaxRotation(par1EntityPlayer), 0.0F, 0.0F, 1.0F); 470 GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); 471 } 472 else 473 { 474 super.rotateCorpse(par1EntityPlayer, par2, par3, par4); 475 } 476 } 477 478 protected void func_96449_a(EntityLiving par1EntityLiving, double par2, double par4, double par6, String par8Str, float par9, double par10) 479 { 480 this.func_96450_a((EntityPlayer)par1EntityLiving, par2, par4, par6, par8Str, par9, par10); 481 } 482 483 /** 484 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: 485 * entityLiving, partialTickTime 486 */ 487 protected void preRenderCallback(EntityLiving par1EntityLiving, float par2) 488 { 489 this.renderPlayerScale((EntityPlayer)par1EntityLiving, par2); 490 } 491 492 protected void func_82408_c(EntityLiving par1EntityLiving, int par2, float par3) 493 { 494 this.func_82439_b((EntityPlayer)par1EntityLiving, par2, par3); 495 } 496 497 /** 498 * Queries whether should render the specified pass or not. 499 */ 500 protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3) 501 { 502 return this.setArmorModel((EntityPlayer)par1EntityLiving, par2, par3); 503 } 504 505 protected void renderEquippedItems(EntityLiving par1EntityLiving, float par2) 506 { 507 this.renderSpecials((EntityPlayer)par1EntityLiving, par2); 508 } 509 510 protected void rotateCorpse(EntityLiving par1EntityLiving, float par2, float par3, float par4) 511 { 512 this.rotatePlayer((EntityPlayer)par1EntityLiving, par2, par3, par4); 513 } 514 515 /** 516 * Sets a simple glTranslate on a LivingEntity. 517 */ 518 protected void renderLivingAt(EntityLiving par1EntityLiving, double par2, double par4, double par6) 519 { 520 this.renderPlayerSleep((EntityPlayer)par1EntityLiving, par2, par4, par6); 521 } 522 523 protected void func_98190_a(EntityLiving par1EntityLiving) 524 { 525 this.func_98191_a((EntityPlayer)par1EntityLiving); 526 } 527 528 public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) 529 { 530 this.renderPlayer((EntityPlayer)par1EntityLiving, par2, par4, par6, par8, par9); 531 } 532 533 /** 534 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then 535 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic 536 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, 537 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. 538 */ 539 public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) 540 { 541 this.renderPlayer((EntityPlayer)par1Entity, par2, par4, par6, par8, par9); 542 } 543}