Fix entities/weapons in hand not using the color modifier

This commit is contained in:
Bernhard Bonigl committed 2014-09-22 15:51:55 +02:00
1 parent 2dec0ad97f
commit 8e0bfdd0ed
1 file changed
+11
@@ -143,6 +143,17 @@ public class ToolCoreRenderer implements IItemRenderer
}
GL11.glPushMatrix();
// color
int color = item.getItem().getColorFromItemStack(item, 0);
float a = (float)(color >> 24 & 0xff) / 255F;
float r = (float)(color >> 16 & 0xff) / 255F;
float g = (float)(color >> 8 & 0xff) / 255F;
float b = (float)(color & 0xff) / 255F;
// no invisible
if(a < 0.01f)
a = 1.0f;
GL11.glColor4f(r, g, b, a);
if (type == ItemRenderType.INVENTORY)
{
GL11.glDisable(GL11.GL_LIGHTING);