diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java index c59b310d..656afc48 100644 --- a/src/main/java/gregtech/api/enums/Dyes.java +++ b/src/main/java/gregtech/api/enums/Dyes.java @@ -16,7 +16,7 @@ public enum Dyes implements IColorModulationContainer { dyeRed(1, 255, 0, 0, "Red"), dyeGreen(2, 0, 255, 0, "Green"), dyeBrown(3, 96, 64, 0, "Brown"), - dyeBlue(4, 0, 0, 255, "Blue"), + dyeBlue(4, 0, 32, 255, "Blue"), dyePurple(5, 128, 0, 128, "Purple"), dyeCyan(6, 0, 255, 255, "Cyan"), dyeLightGray(7, 192, 192, 192, "Light Gray"), @@ -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"), @@ -37,7 +37,7 @@ public enum Dyes implements IColorModulationContainer { */ CABLE_INSULATION(-1, 64, 64, 64, "Cable Insulation"), CONSTRUCTION_FOAM(-1, 64, 64, 64, "Construction Foam"), - MACHINE_METAL(-1, 220, 220, 255, "Machine Metal"); + MACHINE_METAL(-1, 210, 220, 255, "Machine Metal"); public static final Dyes VALUES[] = {dyeBlack, dyeRed, dyeGreen, dyeBrown, dyeBlue, dyePurple, dyeCyan, dyeLightGray, dyeGray, dyePink, dyeLime, dyeYellow, dyeLightBlue, dyeMagenta, dyeOrange, dyeWhite}; 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 diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index feb87ed3..ea4cf6b6 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -88,12 +88,13 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if(this.getBaseMetaTileEntity().isActive()) - pollutionParticles(this.getBaseMetaTileEntity().getWorld()); + if(aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) + pollutionParticles(this.getBaseMetaTileEntity().getWorld(),"largesmoke"); } - public void pollutionParticles(World aWorld){ - XSTR floatGen=new XSTR(); + private static XSTR floatGen=new XSTR(); + + public void pollutionParticles(World aWorld,String name){ boolean chk1,chk2,chk3; float ran1=floatGen.nextFloat(),ran2=0,ran3=0; chk1=ran1*100 1L) { aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY); } - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY); + aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "EU Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY); } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 040b8480..84043151 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -46,7 +46,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { public int mTargetX = 0; public int mTargetY = 0; public int mTargetZ = 0; - public int mTargetD = 0; + public int mTargetD = Integer.MIN_VALUE; public boolean mDebug = false; public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { @@ -204,13 +204,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - if (aBaseMetaTileEntity.isServerSide()) { - if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == 0)) { - this.mTargetX = aBaseMetaTileEntity.getXCoord(); - this.mTargetY = aBaseMetaTileEntity.getYCoord(); - this.mTargetZ = aBaseMetaTileEntity.getZCoord(); - this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; - } + if (aBaseMetaTileEntity.isServerSide() && (this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) { + this.mTargetX = aBaseMetaTileEntity.getXCoord(); + this.mTargetY = aBaseMetaTileEntity.getYCoord(); + this.mTargetZ = aBaseMetaTileEntity.getZCoord(); + this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java index 5e892e79..93611904 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java @@ -44,7 +44,7 @@ public class GT_MetaTileEntity_Locker public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[java.lang.Math.abs(this.mType % Textures.BlockIcons.LOCKERS.length)]}; + return new ITexture[]{this.mTextures[2][(aColorIndex + 1)][0], this.mTextures[2][(aColorIndex + 1)][1], Textures.BlockIcons.LOCKERS[Math.abs(this.mType % Textures.BlockIcons.LOCKERS.length)]}; } return this.mTextures[0][(aColorIndex + 1)]; }