diff options
author | Technus <daniel112092@gmail.com> | 2016-12-17 16:34:55 +0100 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2016-12-17 16:34:55 +0100 |
commit | 756a6b9f63551193b26cd2620196482a8ab99847 (patch) | |
tree | e2e03c3960c9cc5b4ed1f0a95bcf972c6ade50c9 | |
parent | 6eed47cfaa02599b20569490b394b010aea527a4 (diff) | |
download | GT5-Unofficial-756a6b9f63551193b26cd2620196482a8ab99847.tar.gz GT5-Unofficial-756a6b9f63551193b26cd2620196482a8ab99847.tar.bz2 GT5-Unofficial-756a6b9f63551193b26cd2620196482a8ab99847.zip |
Change dyes again and make machines use the GT Dyes instead of Forge Dyes. (makes gui looks like rendered block)
-rw-r--r-- | src/main/java/gregtech/api/enums/Dyes.java | 2 | ||||
-rw-r--r-- | src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index baff954137..656afc4890 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 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 |