aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorboubou_19 <miisterunknown@gmail.com>2021-11-25 01:34:56 +0100
committerboubou_19 <miisterunknown@gmail.com>2021-11-25 01:34:56 +0100
commitedfa66b41faa598b3d0219df4534839e7ed88e74 (patch)
treee675dd292812841308e20d5480e0fd334c64ec36 /src/main/java
parent81ee095c16fcb19bc0c2155057c34325f3b4488d (diff)
downloadGT5-Unofficial-edfa66b41faa598b3d0219df4534839e7ed88e74.tar.gz
GT5-Unofficial-edfa66b41faa598b3d0219df4534839e7ed88e74.tar.bz2
GT5-Unofficial-edfa66b41faa598b3d0219df4534839e7ed88e74.zip
changed large boilers to use per second for more precision
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java9
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java7
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java23
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java22
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java20
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java23
8 files changed, 45 insertions, 70 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index d5698b9657..82f0228d41 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -392,10 +392,11 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mPollutionLargeCombustionEngine = tMainConfig.get("Pollution", "PollutionLargeCombustionEngine",gregtechproxy.mPollutionLargeCombustionEngine).getInt(gregtechproxy.mPollutionLargeCombustionEngine);
gregtechproxy.mPollutionExtremeCombustionEngine = tMainConfig.get("Pollution", "PollutionExtremeCombustionEngine",gregtechproxy.mPollutionExtremeCombustionEngine).getInt(gregtechproxy.mPollutionExtremeCombustionEngine);
gregtechproxy.mPollutionImplosionCompressor = tMainConfig.get("Pollution", "PollutionImplosionCompressor", gregtechproxy.mPollutionImplosionCompressor).getInt(gregtechproxy.mPollutionImplosionCompressor);
- gregtechproxy.mPollutionLargeBronzeBoiler = tMainConfig.get("Pollution", "PollutionLargeBronzeBoiler", gregtechproxy.mPollutionLargeBronzeBoiler).getInt(gregtechproxy.mPollutionLargeBronzeBoiler);
- gregtechproxy.mPollutionLargeSteelBoiler = tMainConfig.get("Pollution", "PollutionLargeSteelBoiler", gregtechproxy.mPollutionLargeSteelBoiler).getInt(gregtechproxy.mPollutionLargeSteelBoiler);
- gregtechproxy.mPollutionLargeTitaniumBoiler = tMainConfig.get("Pollution", "PollutionLargeTitaniumBoiler", gregtechproxy.mPollutionLargeTitaniumBoiler ).getInt(gregtechproxy.mPollutionLargeTitaniumBoiler );
- gregtechproxy.mPollutionLargeTungstenSteelBoiler = tMainConfig.get("Pollution", "PollutionLargeTungstenSteelBoiler", gregtechproxy.mPollutionLargeTungstenSteelBoiler).getInt(gregtechproxy.mPollutionLargeTungstenSteelBoiler);
+ gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeBronzeBoiler", gregtechproxy.mPollutionLargeBronzeBoilerPerSecond).getInt(gregtechproxy.mPollutionLargeBronzeBoilerPerSecond);
+ gregtechproxy.mPollutionLargeSteelBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeSteelBoiler", gregtechproxy.mPollutionLargeSteelBoilerPerSecond).getInt(gregtechproxy.mPollutionLargeSteelBoilerPerSecond);
+ gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeTitaniumBoiler", gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond ).getInt(gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond );
+ gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = tMainConfig.get("Pollution", "PollutionLargeTungstenSteelBoiler", gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond).getInt(gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond);
+ gregtechproxy.mPollutionReleasedByThrottle = tMainConfig.get("Pollution", "PollutionReleasedByThrottle", gregtechproxy.mPollutionReleasedByThrottle).getDouble(gregtechproxy.mPollutionReleasedByThrottle);
gregtechproxy.mPollutionLargeGasTurbine = tMainConfig.get("Pollution", "PollutionLargeGasTurbine", gregtechproxy.mPollutionLargeGasTurbine).getInt( gregtechproxy.mPollutionLargeGasTurbine);
gregtechproxy.mPollutionMultiSmelter = tMainConfig.get("Pollution", "PollutionMultiSmelter", gregtechproxy.mPollutionMultiSmelter).getInt(gregtechproxy.mPollutionMultiSmelter);
gregtechproxy.mPollutionPyrolyseOven = tMainConfig.get("Pollution", "PollutionPyrolyseOven", gregtechproxy.mPollutionPyrolyseOven).getInt(gregtechproxy.mPollutionPyrolyseOven);
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index b2100e7fd0..8fe70c4f72 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -401,6 +401,13 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
public abstract int getPollutionPerTick(ItemStack aStack);
/**
+ * Gets the pollution produced per second by this multiblock
+ */
+ public int getPollutionPerSecond(ItemStack aStack){
+ return 20 * getPollutionPerTick(aStack);
+ }
+
+ /**
* Gets the damage to the ItemStack, usually 0 or 1.
*/
public abstract int getDamageToComponent(ItemStack aStack);
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index b39812b53f..12da46b8d7 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -195,10 +195,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public int mPollutionLargeCombustionEngine = 24;
public int mPollutionExtremeCombustionEngine = 192;
public int mPollutionImplosionCompressor = 500;
- public int mPollutionLargeBronzeBoiler = 12;
- public int mPollutionLargeSteelBoiler = 12;
- public int mPollutionLargeTitaniumBoiler = 12;
- public int mPollutionLargeTungstenSteelBoiler = 12;
+ public int mPollutionLargeBronzeBoilerPerSecond = 1000;
+ public int mPollutionLargeSteelBoilerPerSecond = 2000;
+ public int mPollutionLargeTitaniumBoilerPerSecond = 3000;
+ public int mPollutionLargeTungstenSteelBoilerPerSecond = 4000;
+ public double mPollutionReleasedByThrottle = 1.0/24.0; // divided by 24 because 24 circuit conf
public int mPollutionLargeGasTurbine = 15;
public int mPollutionMultiSmelter = 20;
public int mPollutionPyrolyseOven = 30;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index d5701d61a0..a73fb68962 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -90,7 +90,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En
.addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//?
.addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
.addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 5, 3, false)
.addController("Front bottom")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
index 4277f306c6..1e89258ae4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
@@ -22,25 +22,16 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_Larg
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
-
+ public int getPollutionPerSecond(ItemStack aStack) {
int integratedCircuitConfig = getIntegratedCircuitConfig();
+ return Math.max(1, (int) (GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond/(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * integratedCircuitConfig)));
+ }
- /**
- * This is the coefficient reducing the pollution based on the throttle applied via the circuit.
- * 25 is the equivalent of EU/t removed by a throttle of -1000L/s (25 EU/t * 2 L/EU * 20 ticks = 1000 L/s)
- * so 25/getEUt() is the normalized quantity removed by each increment in the throttle
- */
-
- int integratedCircuitReduction = (1-integratedCircuitConfig*25/getEUt());
- /**
- * max here to clamp it to one in case the integratedCircuitReduction goes negative to ensure 1 gibbl/t
- * of pollution.
- */
- return Math.max(1, GT_Mod.gregtechproxy.mPollutionLargeBronzeBoiler*integratedCircuitReduction);
-
+ @Override
+ public int getPollutionPerTick(ItemStack aStack){
+ return getPollutionPerSecond(aStack)/20;
}
-
+
@Override
public String getCasingMaterial(){
return "Bronze";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
index 637cdaa32d..4c08b1fff1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
@@ -22,24 +22,16 @@ public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_Large
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
-
+ public int getPollutionPerSecond(ItemStack aStack) {
int integratedCircuitConfig = getIntegratedCircuitConfig();
+ return Math.max(1, (int) (GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond/(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * integratedCircuitConfig)));
+ }
- /**
- * This is the coefficient reducing the pollution based on the throttle applied via the circuit.
- * 25 is the equivalent of EU/t removed by a throttle of -1000L/s (25 EU/t * 2 L/EU * 20 ticks = 1000 L/s)
- * so 25/getEUt() is the normalized quantity removed by each increment in the throttle
- */
-
- int integratedCircuitReduction = (1-integratedCircuitConfig*25/getEUt());
- /**
- * max here to clamp it to one in case the integratedCircuitReduction goes negative to ensure 1 gibbl/t
- * of pollution.
- */
- return Math.max(1, GT_Mod.gregtechproxy.mPollutionLargeSteelBoiler*integratedCircuitReduction);
-
+ @Override
+ public int getPollutionPerTick(ItemStack aStack){
+ return getPollutionPerSecond(aStack)/20;
}
+
@Override
public String getCasingMaterial(){
return "Steel";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
index 45542acd9a..3a2566c82e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
@@ -22,22 +22,14 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_La
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
-
+ public int getPollutionPerSecond(ItemStack aStack) {
int integratedCircuitConfig = getIntegratedCircuitConfig();
+ return Math.max(1, (int) (GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond/(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * integratedCircuitConfig)));
+ }
- /**
- * This is the coefficient reducing the pollution based on the throttle applied via the circuit.
- * 25 is the equivalent of EU/t removed by a throttle of -1000L/s (25 EU/t * 2 L/EU * 20 ticks = 1000 L/s)
- * so 25/getEUt() is the normalized quantity removed by each increment in the throttle
- */
-
- int integratedCircuitReduction = (1-integratedCircuitConfig*25/getEUt());
- /**
- * max here to clamp it to one in case the integratedCircuitReduction goes negative to ensure 1 gibbl/t
- * of pollution.
- */
- return Math.max(1, GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoiler*integratedCircuitReduction);
+ @Override
+ public int getPollutionPerTick(ItemStack aStack){
+ return getPollutionPerSecond(aStack)/20;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
index 2006ba9d99..4a1fa4d931 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
@@ -22,25 +22,16 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEnti
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
-
+ public int getPollutionPerSecond(ItemStack aStack) {
int integratedCircuitConfig = getIntegratedCircuitConfig();
+ return Math.max(1, (int) (GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond/(GT_Mod.gregtechproxy.mPollutionReleasedByThrottle * integratedCircuitConfig)));
+ }
- /**
- * This is the coefficient reducing the pollution based on the throttle applied via the circuit.
- * 25 is the equivalent of EU/t removed by a throttle of -1000L/s (25 EU/t * 2 L/EU * 20 ticks = 1000 L/s)
- * so 25/getEUt() is the normalized quantity removed by each increment in the throttle
- */
-
- int integratedCircuitReduction = (1-integratedCircuitConfig*25/getEUt());
- /**
- * max here to clamp it to one in case the integratedCircuitReduction goes negative to ensure 1 gibbl/t
- * of pollution.
- */
- return Math.max(1, GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoiler*integratedCircuitReduction);
-
+ @Override
+ public int getPollutionPerTick(ItemStack aStack){
+ return getPollutionPerSecond(aStack)/20;
}
-
+
@Override
public String getCasingMaterial(){
return "TungstenSteel";