diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2021-12-12 14:29:34 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2021-12-12 14:29:34 +0000 |
commit | 8752df0b865c1a4104851da6ca100ad28952408d (patch) | |
tree | a9fbd24dffbcc9adcab1d14b52487032b64286f2 /src/Java/gtPlusPlus/xmod/gregtech/api | |
parent | 210f8cb4730b8472e0e86a53ed99616e7183b6a5 (diff) | |
parent | 9cbfc7a1bacdbe908632e0fff9ec5ad7f119e563 (diff) | |
download | GT5-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')
3 files changed, 14 insertions, 18 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(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java index d1ce55d3f2..56dff1b1e3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java @@ -41,7 +41,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE } public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String[] aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { - super(aName, aTier, aInputSlots*2, aDescription[0], aTextures); + super(aName, aTier, aInputSlots*2, aDescription, aTextures); mInputslotCount = getInputSlotCount(); mTotalSlotCount = getInputSlotCount()*2; mAllowDuplicateUsageTypes = aAllowDuplicateTypes; @@ -127,7 +127,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE if (i <= getSlotID_LastInput()) { fillStacksIntoFirstSlots(); } - } + } } // Only moves items in the first four slots @@ -141,7 +141,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE } } - private final void tryFillUsageSlots() { + public final void tryFillUsageSlots() { int aSlotSpace = (mInputslotCount - getContentUsageSlots().size()); if (aSlotSpace > 0) { Logger.INFO("We have empty usage slots. "+aSlotSpace); |