aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2017-03-03 16:01:10 +0100
committerTechnus <daniel112092@gmail.com>2017-03-03 16:01:10 +0100
commit8bc7fa7f69946f8a3856f78b9b6eb5b5055c667a (patch)
tree698983182a71d2cd028aae765b040f7c84ab0d74 /src/main/java/gregtech/api/gui
parent68202491c6247d64fe1559552857b527c4d16d2e (diff)
parent5932e76f836b8bb023c66e21f3b11058abd497eb (diff)
downloadGT5-Unofficial-8bc7fa7f69946f8a3856f78b9b6eb5b5055c667a.tar.gz
GT5-Unofficial-8bc7fa7f69946f8a3856f78b9b6eb5b5055c667a.tar.bz2
GT5-Unofficial-8bc7fa7f69946f8a3856f78b9b6eb5b5055c667a.zip
Merge not EM related stuff from branch 'eM' into experimental
Diffstat (limited to 'src/main/java/gregtech/api/gui')
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
index b9cae3e0b3..1d71b09a4f 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
@@ -1,6 +1,7 @@
package gregtech.api.gui;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.Dyes;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemDye;
@@ -28,11 +29,11 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer {
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
- int tColor = mContainer.mTileEntity.getColorization() & 15;
- if (tColor < ItemDye.field_150922_c.length) {
- tColor = ItemDye.field_150922_c[tColor];
- GL11.glColor4f(((tColor >> 16) & 255) / 255.0F, ((tColor >> 8) & 255) / 255.0F, (tColor & 255) / 255.0F, 1.0F);
- } else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- } else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ byte colorByte=mContainer.mTileEntity.getColorization();
+ Dyes color;
+ if(colorByte != -1) color= Dyes.get(colorByte);
+ else color=Dyes.MACHINE_METAL;
+ GL11.glColor3ub((byte)color.mRGBa[0], (byte)color.mRGBa[1], (byte)color.mRGBa[2]);
+ } else GL11.glColor3ub((byte)255,(byte)255,(byte)255);
}
} \ No newline at end of file