aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
-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
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java6
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);