aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGlodBlock <1356392126@qq.com>2021-11-28 11:47:15 +0800
committerGlodBlock <1356392126@qq.com>2021-11-28 11:47:15 +0800
commit3420f959fd55221710b81a9900f2cbef110bb4ea (patch)
tree0cdf4d747661f3d679fd2eb97542e318dda430f6 /src/main/java
parent95f17298975372f5f09fbaa4c8c40502fcc8acdb (diff)
parenta2836a7364c0967e89b0707e7ca5b1df2320f6d9 (diff)
downloadGT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.tar.gz
GT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.tar.bz2
GT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.zip
Merge branch 'experimental' of https://github.com/GTNewHorizons/GT5-Unofficial into tankchest-rework
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java38
-rw-r--r--src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java2
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java9
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java53
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java38
-rw-r--r--src/main/java/gregtech/common/render/GT_PollutionRenderer.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java16
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java24
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java13
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java12
32 files changed, 277 insertions, 80 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index fc7b17e0c6..74a68dc748 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -340,6 +340,8 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mRenderGlowTextures = GregTech_API.sClientDataFile.get("render", "GlowTextures", true);
gregtechproxy.mRenderFlippedMachinesFlipped = GregTech_API.sClientDataFile.get("render", "RenderFlippedMachinesFlipped", true);
gregtechproxy.mRenderIndicatorsOnHatch = GregTech_API.sClientDataFile.get("render", "RenderIndicatorsOnHatch", true);
+ gregtechproxy.mRenderDirtParticles = GregTech_API.sClientDataFile.get("render", "RenderDirtParticles", true);
+ gregtechproxy.mRenderPollutionFog = GregTech_API.sClientDataFile.get("render", "RenderPollutionFog", true);
gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3);
gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16);
@@ -375,12 +377,36 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mTEMachineRecipes = tMainConfig.get("general", "TEMachineRecipes", false).getBoolean(false);
gregtechproxy.mEnableAllMaterials = tMainConfig.get("general", "EnableAllMaterials", false).getBoolean(false);
gregtechproxy.mEnableAllComponents = tMainConfig.get("general", "EnableAllComponents", false).getBoolean(false);
- gregtechproxy.mPollution = tMainConfig.get("Pollution", "EnablePollution", true).getBoolean(true);
- gregtechproxy.mPollutionSmogLimit = tMainConfig.get("Pollution", "SmogLimit", 500000).getInt(500000);
- gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", 750000).getInt(750000);
- gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", 1000000).getInt(1000000);
- gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000);
- gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false);
+
+ //Pollution: edit GT_Proxy.java to change default values
+ gregtechproxy.mPollution = tMainConfig.get("Pollution", "EnablePollution", gregtechproxy.mPollution).getBoolean(gregtechproxy.mPollution);
+ gregtechproxy.mPollutionSmogLimit = tMainConfig.get("Pollution", "SmogLimit", gregtechproxy.mPollutionSmogLimit).getInt(gregtechproxy.mPollutionSmogLimit);
+ gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", gregtechproxy.mPollutionPoisonLimit).getInt(gregtechproxy.mPollutionPoisonLimit);
+ gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", gregtechproxy.mPollutionVegetationLimit).getInt(gregtechproxy.mPollutionVegetationLimit);
+ gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", gregtechproxy.mPollutionSourRainLimit).getInt(gregtechproxy.mPollutionSourRainLimit);
+ gregtechproxy.mPollutionOnExplosion = tMainConfig.get("Pollution", "SourRainLimit", gregtechproxy.mPollutionOnExplosion).getInt(gregtechproxy.mPollutionOnExplosion);
+ gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", gregtechproxy.mExplosionItemDrop).getBoolean(gregtechproxy.mExplosionItemDrop);
+ gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = tMainConfig.get("Pollution", "PollutionPrimitiveBlastFurnace", gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).getInt(gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond);
+ gregtechproxy.mPollutionCharcoalPitPerSecond = tMainConfig.get("Pollution", "PollutionCharcoalPit", gregtechproxy.mPollutionCharcoalPitPerSecond).getInt(gregtechproxy.mPollutionCharcoalPitPerSecond);
+ gregtechproxy.mPollutionEBFPerSecond = tMainConfig.get("Pollution", "PollutionEBF", gregtechproxy.mPollutionEBFPerSecond).getInt(gregtechproxy.mPollutionEBFPerSecond);
+ gregtechproxy.mPollutionLargeCombustionEnginePerSecond = tMainConfig.get("Pollution", "PollutionLargeCombustionEngine",gregtechproxy.mPollutionLargeCombustionEnginePerSecond).getInt(gregtechproxy.mPollutionLargeCombustionEnginePerSecond);
+ gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = tMainConfig.get("Pollution", "PollutionExtremeCombustionEngine",gregtechproxy.mPollutionExtremeCombustionEnginePerSecond).getInt(gregtechproxy.mPollutionExtremeCombustionEnginePerSecond);
+ gregtechproxy.mPollutionImplosionCompressorPerSecond = tMainConfig.get("Pollution", "PollutionImplosionCompressor", gregtechproxy.mPollutionImplosionCompressorPerSecond).getInt(gregtechproxy.mPollutionImplosionCompressorPerSecond);
+ 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.mPollutionLargeGasTurbinePerSecond = tMainConfig.get("Pollution", "PollutionLargeGasTurbine", gregtechproxy.mPollutionLargeGasTurbinePerSecond).getInt( gregtechproxy.mPollutionLargeGasTurbinePerSecond);
+ gregtechproxy.mPollutionMultiSmelterPerSecond = tMainConfig.get("Pollution", "PollutionMultiSmelter", gregtechproxy.mPollutionMultiSmelterPerSecond).getInt(gregtechproxy.mPollutionMultiSmelterPerSecond);
+ gregtechproxy.mPollutionPyrolyseOvenPerSecond = tMainConfig.get("Pollution", "PollutionPyrolyseOven", gregtechproxy.mPollutionPyrolyseOvenPerSecond).getInt(gregtechproxy.mPollutionPyrolyseOvenPerSecond);
+ gregtechproxy.mPollutionSmallCoalBoilerPerSecond = tMainConfig.get("Pollution", "PollutionSmallCoalBoiler", gregtechproxy.mPollutionSmallCoalBoilerPerSecond).getInt(gregtechproxy.mPollutionSmallCoalBoilerPerSecond);
+ gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = tMainConfig.get("Pollution", "PollutionHighPressureLavaBoiler", gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond).getInt(gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond);
+ gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = tMainConfig.get("Pollution", "PollutionHighPressureCoalBoiler", gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond).getInt(gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond);
+ gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = tMainConfig.get("Pollution", "PollutionBaseDieselGenerator",gregtechproxy.mPollutionBaseDieselGeneratorPerSecond).getInt(gregtechproxy.mPollutionBaseDieselGeneratorPerSecond);
+ gregtechproxy.mPollutionDieselGeneratorReleasedByTier = tMainConfig.get("Pollution", "PollutionReleasedByTier", gregtechproxy.mPollutionDieselGeneratorReleasedByTier).getDoubleList();
+ gregtechproxy.mPollutionBaseGasTurbinePerSecond = tMainConfig.get("Pollution", "PollutionBaseDieselGenerator", gregtechproxy.mPollutionBaseGasTurbinePerSecond).getInt(gregtechproxy.mPollutionBaseGasTurbinePerSecond);
+
gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid");
gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true);
if (gregtechproxy.mEnableCleanroom)
diff --git a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java
index a24c4acbcd..e1f3c3f0e0 100644
--- a/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java
+++ b/src/main/java/gregtech/api/graphs/consumers/NodeEnergyReceiver.java
@@ -73,7 +73,7 @@ public class NodeEnergyReceiver extends ConsumerNode {
tWorld.setBlock(tX, tY, tZ, Blocks.air);
if (GregTech_API.sMachineExplosions)
if (GT_Mod.gregtechproxy.mPollution)
- GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), 100000);
+ GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), GT_Mod.gregtechproxy.mPollutionOnExplosion);
new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder()
.setStrength(tStrength)
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
index 24d0576864..30a5230168 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
@@ -113,7 +113,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
tWorld.setBlock(tX, tY, tZ, Blocks.air);
if (GregTech_API.sMachineExplosions)
if (GT_Mod.gregtechproxy.mPollution)
- GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), 100000);
+ GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX, tZ), GT_Mod.gregtechproxy.mPollutionOnExplosion);
new WorldSpawnedEventBuilder.ExplosionEffectEventBuilder()
.setStrength(tStrength)
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 9176d063ce..bd2dbcd630 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -481,7 +481,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
- long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
+ long tOutputVoltage = Math.max(oOutput, oOutput + (1L << Math.max(0, GT_Utility.getTier(oOutput) - 1))),
+ tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
if (tUsableAmperage > 0) {
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
mAverageEUOutput[mAverageEUOutputIndex] += tEU;
@@ -1403,7 +1404,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
}
}
- GT_Pollution.addPollution(this, 100000);
+ GT_Pollution.addPollution(this, GT_Mod.gregtechproxy.mPollutionOnExplosion);
mMetaTileEntity.doExplosion(aAmount);
}
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
index bb7b795c36..289a43fdd8 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java
@@ -117,7 +117,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
@Override
public boolean isFacingValid(byte aSide) {
- return aSide > 1;
+ return true;
}
@Override
@@ -214,7 +214,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
//long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK
if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) {
- GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution());
+ // divided by two because this is called every 10 ticks, not 20
+ GT_Pollution.addPollution(getBaseMetaTileEntity(),getPollution()/2);
mFluid.amount -= tFluidAmountToUse * tConsumed;
}
}
@@ -229,7 +230,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true);
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
- GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution());
+ // divided by two because this is called every 10 ticks, not 20
+ GT_Pollution.addPollution(getBaseMetaTileEntity(),getPollution()/2);
}
}
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
index 7b99d78009..552d3d6587 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicTank.java
@@ -16,7 +16,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
+ *
* This is the main construct for my generic Tanks. Filling and emptying behavior have to be implemented manually
*/
public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_TieredMachineBlock implements IHasFluidDisplayItem {
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 6369c48f8e..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);
@@ -539,7 +546,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
GT_Log.exp.println("MultiBlockExplosion at: " +this.getBaseMetaTileEntity().getXCoord()+" | "+this.getBaseMetaTileEntity().getYCoord()+" | "+this.getBaseMetaTileEntity().getZCoord()+" DIMID: "+ this.getBaseMetaTileEntity().getWorld().provider.dimensionId+".");
- GT_Pollution.addPollution(getBaseMetaTileEntity(), 300000);
+ GT_Pollution.addPollution(getBaseMetaTileEntity(), GT_Mod.gregtechproxy.mPollutionOnExplosion);
mInventory[1] = null;
for (MetaTileEntity tTileEntity : mInputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
for (MetaTileEntity tTileEntity : mOutputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index c0ea06af07..6e12a3d36c 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -1585,23 +1585,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
if (aInputs == null || aInputs.length < 2 || aInputs[0] == null || aInputs[1] == null || !GregTech_API.sPostloadFinished)
return rRecipe;
- if (rRecipe == null) {
- if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[0], false, true)) {
- ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[1]);
- tOutput.setStackDisplayName(aInputs[0].getDisplayName());
- rRecipe = new GT_Recipe(false, new ItemStack[]{ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[1])}, new ItemStack[]{tOutput}, null, null, null, null, 128, 8, 0);
- rRecipe.mCanBeBuffered = false;
- return rRecipe;
- }
- if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[1], false, true)) {
- ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[0]);
- tOutput.setStackDisplayName(aInputs[1].getDisplayName());
- rRecipe = new GT_Recipe(false, new ItemStack[]{ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, null, null, 128, 8, 0);
- rRecipe.mCanBeBuffered = false;
- return rRecipe;
- }
- return null;
- }
+ if (rRecipe == null)
+ return findRenamingRecipe(aInputs);
for (ItemStack aMold : aInputs) {
if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, false, true)) {
NBTTagCompound tNBT = aMold.getTagCompound();
@@ -1617,6 +1602,40 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
}
return rRecipe;
}
+
+ private ItemStack findNameMoldIndex(ItemStack[] inputs) {
+ for (ItemStack stack: inputs) {
+ if (ItemList.Shape_Mold_Name.isStackEqual(stack, false, true))
+ return stack;
+ }
+ return null;
+ }
+
+ private ItemStack findStackToRename(ItemStack[] inputs, ItemStack mold) {
+ for (ItemStack stack: inputs) {
+ if (stack == mold || stack == null)
+ continue;
+ return stack;
+ }
+ return null;
+ }
+
+ private GT_Recipe findRenamingRecipe(ItemStack[] inputs) {
+ ItemStack mold = findNameMoldIndex(inputs);
+ if (mold == null)
+ return null;
+ ItemStack input = findStackToRename(inputs, mold);
+ if (input == null)
+ return null;
+ ItemStack output = GT_Utility.copyAmount(1, input);
+ output.setStackDisplayName(mold.getDisplayName());
+ GT_Recipe recipe = new GT_Recipe(false,
+ new ItemStack[]{ ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, input) },
+ new ItemStack[]{ output },
+ null, null, null, null, 128, 8, 0);
+ recipe.mCanBeBuffered = false;
+ return recipe;
+ }
}
/**
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index a1706ee6e9..569e06643a 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -188,6 +188,28 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public int mPollutionPoisonLimit = 750000;
public int mPollutionVegetationLimit = 1000000;
public int mPollutionSourRainLimit = 2000000;
+ public int mPollutionOnExplosion = 100000;
+ public int mPollutionPrimitveBlastFurnacePerSecond = 200;
+ public int mPollutionEBFPerSecond = 400;
+ public int mPollutionCharcoalPitPerSecond = 100;
+ public int mPollutionLargeCombustionEnginePerSecond = 480;
+ public int mPollutionExtremeCombustionEnginePerSecond = 3840;
+ public int mPollutionImplosionCompressorPerSecond = 10000;
+ 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 mPollutionLargeGasTurbinePerSecond = 300;
+ public int mPollutionMultiSmelterPerSecond = 400;
+ public int mPollutionPyrolyseOvenPerSecond = 300;
+ public int mPollutionSmallCoalBoilerPerSecond = 20;
+ public int mPollutionHighPressureLavaBoilerPerSecond = 20;
+ public int mPollutionHighPressureCoalBoilerPerSecond = 30;
+ public int mPollutionBaseDieselGeneratorPerSecond = 200;
+ public double[] mPollutionDieselGeneratorReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8};
+ public int mPollutionBaseGasTurbinePerSecond = 200;
+ public double[] mPollutionGasTurbineReleasedByTier = new double[]{0.1, 1.0, 0.9, 0.8};
public final GT_UO_DimensionList mUndergroundOil = new GT_UO_DimensionList();
public int mTicksUntilNextCraftSound = 0;
public double mMagneticraftBonusOutputPercent = 100.0d;
@@ -236,6 +258,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
*/
public boolean mRenderIndicatorsOnHatch = true;
+ /**
+ * This enables the rendering of dirt particles if pollution is enabled too
+ */
+ public boolean mRenderDirtParticles = true;
+
+ /**
+ * This enables the rendering of the pollution fog if pollution is enabled too
+ */
+ public boolean mRenderPollutionFog = true;
+
public static final int GUI_ID_COVER_SIDE_BASE = 10; // Takes GUI ID 10 - 15
public static Map<String, Integer> oreDictBurnTimes = new HashMap<>();
@@ -632,6 +664,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_leggings, 1, W));
GregTech_API.sElectroHazmatList.add(new ItemStack(Items.chainmail_boots, 1, W));
+ //Infinity Hazmat
+ addFullHazmatToGeneralItem("Avaritia", "Infinity_Helm", 1L);
+ addFullHazmatToGeneralItem("Avaritia", "Infinity_Chest", 1L);
+ addFullHazmatToGeneralItem("Avaritia", "Infinity_Pants", 1L);
+ addFullHazmatToGeneralItem("Avaritia", "Infinity_Shoes", 1L);
+
GregTech_API.sLoadStarted = true;
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
index 4353786a7b..305eadf145 100644
--- a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.GT_Mod;
import gregtech.common.entities.GT_EntityFXPollution;
import gregtech.common.misc.GT_ClientPollutionMap;
import net.minecraft.block.Block;
@@ -122,6 +123,8 @@ public class GT_PollutionRenderer {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void renderGTPollutionFog(EntityViewRenderEvent.RenderFogEvent event) {
+ if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return;
+
if ((!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode) ||
(fogIntensityLastTick <= 0 && fogIntensityLastTick >= FOG_START_EXP_RATIO))
return;
@@ -138,6 +141,8 @@ public class GT_PollutionRenderer {
@SubscribeEvent(priority = EventPriority.LOWEST)
public void renderGTPollutionFog(EntityViewRenderEvent.FogDensity event) {
+ if (!GT_Mod.gregtechproxy.mRenderPollutionFog) return;
+
if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode)
return;
@@ -194,6 +199,7 @@ public class GT_PollutionRenderer {
// Adding dirt particles in the air
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onClientTick(TickEvent.ClientTickEvent event) {
+ if (!GT_Mod.gregtechproxy.mRenderDirtParticles) return;
Minecraft mc = Minecraft.getMinecraft();
if (mc == null)
return;
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index 41620dd711..3927241e79 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.boilers;
+import gregtech.GT_Mod;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
@@ -30,7 +31,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
super(aID, aName, aNameRegional, new String[]{
"An early way to get Steam Power",
"Produces 120L of Steam per second",
- "Causes 20 Pollution per second"});
+ "Causes "+Integer.toString(GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond)+" Pollution per second"});
}
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional, String[] aDescription) {
@@ -99,7 +100,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
@Override
protected int getPollution() {
- return 20;
+ return GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
index aeb0a66173..18010c0886 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.boilers;
+import gregtech.GT_Mod;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
@@ -28,13 +29,12 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
public static final int ENERGY_PER_LAVA = 1;
public static final int CONSUMPTION_PER_HEATUP = 3;
public static final int PRODUCTION_PER_SECOND = 600;
- public static final int POLLUTION_PER_SECOND = 20;
public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) {
super(aID, aName, aN