mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 00:47:32 +00:00
Fix entities/weapons in hand not using the color modifier
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user