aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
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
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')
-rw-r--r--src/main/java/gregtech/api/enums/Dyes.java6
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java13
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java15
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java2
6 files changed, 26 insertions, 26 deletions
diff --git a/src/main/java/gregtech/api/enums/Dyes.java b/src/main/java/gregtech/api/enums/Dyes.java
index c59b310d55..656afc4890 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 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
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 feb87ed33f..ea4cf6b633 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<calculatePollutionReduction(100);
@@ -128,12 +129,12 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
}
if(chk1)
- aWorld.spawnParticle("largesmoke", xPos + ran1*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
+ aWorld.spawnParticle(name, xPos + ran1*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
if(chk2)
- aWorld.spawnParticle("largesmoke", xPos + ran2*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
+ aWorld.spawnParticle(name, xPos + ran2*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
if(chk3)
- aWorld.spawnParticle("largesmoke", xPos + ran3*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
+ aWorld.spawnParticle(name, xPos + ran3*0.5F, yPos + floatGen.nextFloat()*0.5F, zPos + floatGen.nextFloat()*0.5F, xSpd, ySpd, zSpd);
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index bfe24782ca..28ca4f86f5 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -64,7 +64,7 @@ public class GT_Item_Machines
if (tTileEntity.getOutputAmperage() > 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 040b8480d3..8404315141 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 5e892e79e6..93611904b7 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)];
}