aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-09-09 17:42:57 +0200
committerTechnus <daniel112092@gmail.com>2016-09-21 22:22:41 +0200
commitb374cf7a70d23b85f82bcf4489ce71bfd0dbdef2 (patch)
treef1c212d51317ed3e1778494fe94329ec8586e666
parent00c69b5a39b5627d466296637d6c37e20c5733be (diff)
downloadGT5-Unofficial-b374cf7a70d23b85f82bcf4489ce71bfd0dbdef2.tar.gz
GT5-Unofficial-b374cf7a70d23b85f82bcf4489ce71bfd0dbdef2.tar.bz2
GT5-Unofficial-b374cf7a70d23b85f82bcf4489ce71bfd0dbdef2.zip
Tweaks
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java87
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java1
6 files changed, 60 insertions, 43 deletions
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
index 020369e3f2..6f514dd3c3 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_PlasmaGenerator.java
@@ -42,7 +42,7 @@ public class GT_MetaTileEntity_PlasmaGenerator
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, (10 + (this.mTier * 10)));
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10,10 + Math.min(90,this.mTier * 10)));
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index b0cd517ab7..087c58fa5f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -87,7 +87,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
fuelValue = aFuel.mSpecialValue;
fuelRemaining = hatchFluid1.amount; //Record available fuel
- this.mEUt = mEfficiency < 2000 ? 0 : (int) (2048 * ((float) mEfficiency / 10000)); //Output 0 if startup is less than 20%
+ this.mEUt = mEfficiency < 2000 ? 0 : (int) ((2048L * mEfficiency) / 10000L); //Output 0 if startup is less than 20%
this.mProgresstime = 1;
this.mMaxProgresstime = 1;
this.mEfficiencyIncrease = 15;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index 4ee64d7b01..2769944f36 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -92,7 +92,9 @@ public class GT_MetaTileEntity_ImplosionCompressor
//In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false;
- this.mEUt = (-tRecipe.mEUt);
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
sendLoopStart((byte) 20);
updateSlots();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index a3f9c891ce..0ad0e7cfd4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -92,7 +92,12 @@ public class GT_MetaTileEntity_MultiFurnace
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false;
- this.mEUt = -GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount);
+ this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1);
+ if (mEUt == Integer.MAX_VALUE - 1)
+ return false;
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
}
updateSlots();
return true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index d0b6104a83..4b203f8b9e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -48,7 +48,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
"1x Energy Hatch (Any casing)",
"Robust Tungstensteel Casings for the rest (16 at least!)",
"Place up to 64 Single Block GT Machines into the GUI Inventory",
- "Maximal tier of machines inside: 9"};
+ "Maximal overclockedness of machines inside: Tier 9"};
}
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
@@ -62,6 +62,29 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png");
}
+ //TODO: Expand so it also does the non recipe map recipes
+ /*
+ public void remoteRecipeCheck() {
+ if (mInventory[1] == null) return;
+ String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", "");
+ if (tmp.startsWith("replicator")) {
+
+ } else if (tmp.startsWith("brewery")) {
+
+ } else if (tmp.startsWith("packer")) {
+
+ } else if (tmp.startsWith("printer")) {
+
+ } else if (tmp.startsWith("disassembler")) {
+
+ } else if (tmp.startsWith("massfab")) {
+
+ } else if (tmp.startsWith("scanner")) {
+
+ }
+ }
+ */
+
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
if (mInventory[1] == null) return null;
String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", "");
@@ -172,51 +195,36 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
}
ArrayList<ItemStack> tInputList = getStoredInputs();
int tTier = 0;
- /* Better dont
- if (mInventory[1].getUnlocalizedName().endsWith("10")) {
- tTier = 10;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("11")) {
- tTier = 11;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("12")) {
- tTier = 12;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("13")) {
- tTier = 13;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("14")) {
- tTier = 14;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("15")) {
- tTier = 15;
- }
- */
- if (mInventory[1].getUnlocalizedName().endsWith("01")) {
+
+ if (mInventory[1].getUnlocalizedName().endsWith("10")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("11")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("12")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("13")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("14")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("15")) {
+ tTier = 9;
+ }else if (mInventory[1].getUnlocalizedName().endsWith("1")) {
tTier = 1;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("02")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("2")) {
tTier = 2;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("03")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("3")) {
tTier = 3;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("04")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("4")) {
tTier = 4;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("05")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("5")) {
tTier = 5;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("06")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("6")) {
tTier = 6;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("07")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("7")) {
tTier = 7;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("08")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("8")) {
tTier = 8;
- }
- if (mInventory[1].getUnlocalizedName().endsWith("09")) {
+ }else if (mInventory[1].getUnlocalizedName().endsWith("9")) {
tTier = 9;
}
@@ -303,7 +311,10 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
this.mOutputFluids = new FluidStack[]{tFOut};
updateSlots();
return true;
+ }/* else{
+ ...remoteRecipeCheck()
}
+ */
}
return false;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index e5f832c0eb..f187096eeb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -74,7 +74,6 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
}
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
if (tRecipe.mFluidOutputs.length > 0)
this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};