diff options
author | boubou_19 <miisterunknown@gmail.com> | 2021-11-29 12:31:58 +0100 |
---|---|---|
committer | boubou_19 <miisterunknown@gmail.com> | 2021-11-29 12:31:58 +0100 |
commit | 70755b5265f044718cd697de94f10c79a1d2671b (patch) | |
tree | 47bb4a91b3505f9921be1bd43cd6337164b19dc5 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations | |
parent | 31d35697523be7d9426b74b7e3f4c38e4a85f432 (diff) | |
download | GT5-Unofficial-70755b5265f044718cd697de94f10c79a1d2671b.tar.gz GT5-Unofficial-70755b5265f044718cd697de94f10c79a1d2671b.tar.bz2 GT5-Unofficial-70755b5265f044718cd697de94f10c79a1d2671b.zip |
added pollution config for single blocks
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java | 17 |
1 files changed, 10 insertions, 7 deletions
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 6e33529b66..885069693d 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 @@ -13,6 +13,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -22,13 +23,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,8 +62,7 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ @Override - public String[] getDescription() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { + public String[] getDescription() { int pollMin = mTier == 4 ? 250 : (mTier == 5 ? 500 : 750); int pollMax = mTier == 4 ? 2000 : (mTier == 5 ? 4000 : 6000); String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second"; @@ -65,10 +70,6 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ this.mDescription, "Fuel Efficiency: " + this.getEfficiency() + "%", aPollution}; - } - return new String[]{ - this.mDescription, - "Fuel Efficiency: " + this.getEfficiency() + "%"}; } @@ -292,7 +293,9 @@ 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(); |