aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-12 14:29:34 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-12 14:29:34 +0000
commit8752df0b865c1a4104851da6ca100ad28952408d (patch)
treea9fbd24dffbcc9adcab1d14b52487032b64286f2 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base
parent210f8cb4730b8472e0e86a53ed99616e7183b6a5 (diff)
parent9cbfc7a1bacdbe908632e0fff9ec5ad7f119e563 (diff)
downloadGT5-Unofficial-8752df0b865c1a4104851da6ca100ad28952408d.tar.gz
GT5-Unofficial-8752df0b865c1a4104851da6ca100ad28952408d.tar.bz2
GT5-Unofficial-8752df0b865c1a4104851da6ca100ad28952408d.zip
Merge branch 'master' of https://github.com/GTNewHorizons/GTplusplus into gtnh-milling
# Conflicts: # build.properties # src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java22
2 files changed, 11 insertions, 15 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index fd021f1487..4d79be29b1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -2231,10 +2231,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
* Pollution Management
*/
- public int getPollutionPerTick(ItemStack arg0) {
- return 0;
- }
-
private static Method calculatePollutionReduction = null;
public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) {
if (calculatePollutionReduction != null) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
index 2e63e2476f..53b891ffb9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
@@ -22,13 +22,18 @@ import net.minecraftforge.fluids.FluidStack;
public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_BasicTank {
private boolean useFuel = false;
+ protected int pollMin, pollMax;
public GregtechRocketFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier, final String aDescription, final ITexture... aTextures) {
super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
+ int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]);
+ int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]);
}
public GregtechRocketFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
+ int pollMin = (int)(CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]);
+ int pollMax = (int)(CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]);
}
@Override
@@ -56,21 +61,14 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
@Override
- public String[] getDescription() {
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- int pollMin = mTier == 4 ? 250 : (mTier == 5 ? 500 : 750);
- int pollMax = mTier == 4 ? 2000 : (mTier == 5 ? 4000 : 6000);
+ public String[] getDescription() {
String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
return new String[]{
this.mDescription,
"Fuel Efficiency: " + this.getEfficiency() + "%",
aPollution,
CORE.GT_Tooltip};
- }
- return new String[]{
- this.mDescription,
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- CORE.GT_Tooltip};
+ }
}
@@ -294,8 +292,10 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
}
}
- public abstract int getPollution();
-
+ public int getPollution() {
+ return MathUtils.randInt(pollMin, pollMax);
+ }
+
public abstract GT_Recipe_Map getRecipes();
public abstract int getEfficiency();