diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index baff9541..656afc48 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -24,7 +24,7 @@ public enum Dyes implements IColorModulationContainer { dyePink(9, 255, 192, 192, "Pink"), dyeLime(10, 128, 255, 128, "Lime"), dyeYellow(11, 255, 255, 0, "Yellow"), - dyeLightBlue(12, 128, 128, 255, "Light Blue"), + dyeLightBlue(12, 96, 128, 255, "Light Blue"), dyeMagenta(13, 255, 0, 255, "Magenta"), dyeOrange(14, 255, 128, 0, "Orange"), dyeWhite(15, 255, 255, 255, "White"), 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 b9cae3e0..1d71b09a 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