<commit_before>--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
@@ -19,7 +19,13 @@
 import net.minecraft.scoreboard.ScoreObjective;
 import net.minecraft.scoreboard.Scoreboard;
 import net.minecraft.util.MathHelper;
+import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient;
 import org.lwjgl.opengl.GL11;
+import net.minecraft.item.ItemBlock;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
 
 @SideOnly(Side.CLIENT)
 public class RenderPlayer extends RenderLiving
@@ -28,6 +34,8 @@
     private ModelBiped modelArmorChestplate;
     private ModelBiped modelArmor;
     public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"};
+    public static float NAME_TAG_RANGE = 64.0f;
+    public static float NAME_TAG_RANGE_SNEAK = 32.0f;
 
     public RenderPlayer()
     {
@@ -56,7 +64,7 @@
             if (item instanceof ItemArmor)
             {
                 ItemArmor itemarmor = (ItemArmor)item;
-                this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png");
+                this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png", par2, 1));
                 ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
                 modelbiped.bipedHead.showModel = par2 == 0;
                 modelbiped.bipedHeadwear.showModel = par2 == 0;
@@ -65,6 +73,7 @@
                 modelbiped.bipedLeftArm.showModel = par2 == 1;
                 modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
                 modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
+                modelbiped = ForgeHooksClient.getArmorModel(par1EntityPlayer, itemstack, par2, modelbiped);
                 this.setRenderPassModel(modelbiped);
 
                 if (modelbiped != null)
@@ -84,9 +93,10 @@
 
                 float f1 = 1.0F;
 
-                if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
-                {
-                    int j = itemarmor.getColor(itemstack);
+                //Move outside if to allow for more then just CLOTH
+                int j = itemarmor.getColor(itemstack);
+                if (j != -1)
+                {
                     float f2 = (float)(j >> 16 & 255) / 255.0F;
                     float f3 = (float)(j >> 8 & 255) / 255.0F;
                     float f4 = (float)(j & 255) / 255.0F;
@@ -125,7 +135,7 @@
             if (item instanceof ItemArmor)
             {
                 ItemArmor itemarmor = (ItemArmor)item;
-                this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png");
+                this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png", par2, 2));
                 float f1 = 1.0F;
                 GL11.glColor3f(f1, f1, f1);
             }
@@ -184,9 +194,12 @@
             this.modelBipedMain.bipedHead.postRender(0.0625F);
             float f2;
 
-            if (itemstack.getItem().itemID < 256)
-            {
-                if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+            if (itemstack != null && itemstack.getItem() instanceof ItemBlock)
+            {
+                IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+                boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+
+                if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
                 {
                     f2 = 0.625F;
                     GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -304,7 +317,10 @@
                 enumaction = itemstack1.getItemUseAction();
             }
 
-            if (itemstack1.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
+            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+            boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+
+            if (is3D || (itemstack1.itemID < Block.blocksList.length && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
             {
                 f3 = 0.5F;
                 GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -361,7 +377,7 @@
 
             if (itemstack1.getItem().requiresMultipleRenderPasses())
             {
-                for (j = 0; j <= 1; ++j)
+                for (j = 0; j < itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++j)
                 {
                     int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j);
                     f12 = (float)(k >> 16 & 255) / 255.0F;
<commit_msg>Fix rotation issue with non-block items.<commit_after>--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
@@ -19,7 +19,13 @@
 import net.minecraft.scoreboard.ScoreObjective;
 import net.minecraft.scoreboard.Scoreboard;
 import net.minecraft.util.MathHelper;
+import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient;
 import org.lwjgl.opengl.GL11;
+import net.minecraft.item.ItemBlock;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
 
 @SideOnly(Side.CLIENT)
 public class RenderPlayer extends RenderLiving
@@ -28,6 +34,8 @@
     private ModelBiped modelArmorChestplate;
     private ModelBiped modelArmor;
     public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"};
+    public static float NAME_TAG_RANGE = 64.0f;
+    public static float NAME_TAG_RANGE_SNEAK = 32.0f;
 
     public RenderPlayer()
     {
@@ -56,7 +64,7 @@
             if (item instanceof ItemArmor)
             {
                 ItemArmor itemarmor = (ItemArmor)item;
-                this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png");
+                this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png", par2, 1));
                 ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
                 modelbiped.bipedHead.showModel = par2 == 0;
                 modelbiped.bipedHeadwear.showModel = par2 == 0;
@@ -65,6 +73,7 @@
                 modelbiped.bipedLeftArm.showModel = par2 == 1;
                 modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
                 modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
+                modelbiped = ForgeHooksClient.getArmorModel(par1EntityPlayer, itemstack, par2, modelbiped);
                 this.setRenderPassModel(modelbiped);
 
                 if (modelbiped != null)
@@ -84,9 +93,10 @@
 
                 float f1 = 1.0F;
 
-                if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
-                {
-                    int j = itemarmor.getColor(itemstack);
+                //Move outside if to allow for more then just CLOTH
+                int j = itemarmor.getColor(itemstack);
+                if (j != -1)
+                {
                     float f2 = (float)(j >> 16 & 255) / 255.0F;
                     float f3 = (float)(j >> 8 & 255) / 255.0F;
                     float f4 = (float)(j & 255) / 255.0F;
@@ -125,7 +135,7 @@
             if (item instanceof ItemArmor)
             {
                 ItemArmor itemarmor = (ItemArmor)item;
-                this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png");
+                this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png", par2, 2));
                 float f1 = 1.0F;
                 GL11.glColor3f(f1, f1, f1);
             }
@@ -184,9 +194,12 @@
             this.modelBipedMain.bipedHead.postRender(0.0625F);
             float f2;
 
-            if (itemstack.getItem().itemID < 256)
-            {
-                if (RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
+            if (itemstack != null && itemstack.getItem() instanceof ItemBlock)
+            {
+                IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+                boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+
+                if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
                 {
                     f2 = 0.625F;
                     GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -304,7 +317,11 @@
                 enumaction = itemstack1.getItemUseAction();
             }
 
-            if (itemstack1.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
+            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+            boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+            boolean isBlock = itemstack1.itemID < Block.blocksList.length && itemstack1.getItemSpriteNumber() == 0;
+
+            if (is3D || (isBlock && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
             {
                 f3 = 0.5F;
                 GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -361,7 +378,7 @@
 
             if (itemstack1.getItem().requiresMultipleRenderPasses())
             {
-                for (j = 0; j <= 1; ++j)
+                for (j = 0; j < itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++j)
                 {
                     int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j);
                     f12 = (float)(k >> 16 & 255) / 255.0F;

{'fraction_non_alphanumeric': 0.13021120293847566, 'fraction_numerical': 0.04315886134067952, 'mean_word_length': 2.2617550164719975, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1568538', 'n_tokens_mistral': 3738, 'n_tokens_neox': 3432, 'n_words': 596}