aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java130
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java32
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java26
-rw-r--r--src/main/java/gregtech/common/GT_UndergroundOil.java32
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java91
-rw-r--r--src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java3
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java35
-rw-r--r--src/main/java/gregtech/common/render/GT_PollutionRenderer.java10
-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_AbstractMultiFurnace.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java5
-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.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java19
-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_LargeChemicalReactor.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java5
-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_ProcessingArray.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java5
44 files changed, 406 insertions, 180 deletions
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java
index 865fa83f7e..afaac41650 100644
--- a/src/main/java/gregtech/common/GT_Pollution.java
+++ b/src/main/java/gregtech/common/GT_Pollution.java
@@ -9,6 +9,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.net.GT_Packet_Pollution;
import gregtech.api.util.GT_ChunkAssociatedData;
import gregtech.api.util.GT_Utility;
+import gregtech.common.render.GT_PollutionRenderer;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
@@ -27,12 +28,16 @@ import net.minecraftforge.event.world.ChunkDataEvent;
import net.minecraftforge.event.world.ChunkWatchEvent;
import net.minecraftforge.event.world.WorldEvent;
+import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
+import java.util.function.Consumer;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
import static gregtech.common.GT_Proxy.dimensionWisePollution;
@@ -73,11 +78,12 @@ public class GT_Pollution {
* Muffler Hatch Pollution reduction: ** inaccurate **
* LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%)
*/
- private List<ChunkCoordIntPair> pollutionList = new ArrayList<>();//chunks left to process
- private final List<ChunkCoordIntPair> chunkData = new ArrayList<>();//link to chunk data that is saved/loaded
+ private List<ChunkCoordIntPair> pollutionList = new ArrayList<>();//chunks left to process in this cycle
+ private final Set<ChunkCoordIntPair> pollutedChunks = new HashSet<>();// a global list of all chunks with positive pollution
private int operationsPerTick = 0;//how much chunks should be processed in each cycle
private static final short cycleLen = 1200;
private final World world;
+ private boolean blank = true;
public static int mPlayerPollution;
private static int POLLUTIONPACKET_MINVALUE = 1000;
@@ -96,6 +102,7 @@ public class GT_Pollution {
public static void onWorldTick(TickEvent.WorldTickEvent aEvent) {//called from proxy
//return if pollution disabled
if (!GT_Mod.gregtechproxy.mPollution) return;
+ if (aEvent.phase == TickEvent.Phase.START) return;
final GT_Pollution pollutionInstance = dimensionWisePollution.get(aEvent.world.provider.dimensionId);
if (pollutionInstance == null) return;
pollutionInstance.tickPollutionInWorld((int) (aEvent.world.getTotalWorldTime() % cycleLen));
@@ -103,16 +110,18 @@ public class GT_Pollution {
private void tickPollutionInWorld(int aTickID) {//called from method above
//gen data set
- if (aTickID == 0) {
+ if (aTickID == 0 || blank) {
// make a snapshot of what to work on
- // counterintuitive as it seems, but this is the fastest way java collections framework offers us.
- pollutionList = new ArrayList<>(chunkData);
+ pollutionList = new ArrayList<>(pollutedChunks);
//set operations per tick
- if (pollutionList.size() > 0) operationsPerTick = (pollutionList.size() / cycleLen);
- else operationsPerTick = 0;//SANity
+ if (pollutionList.size() > 0)
+ operationsPerTick = Math.max(1, pollutionList.size() / cycleLen);
+ else
+ operationsPerTick = 0; //SANity
+ blank = false;
}
- for (int chunksProcessed = 0; chunksProcessed <= operationsPerTick; chunksProcessed++) {
+ for (int chunksProcessed = 0; chunksProcessed < operationsPerTick; chunksProcessed++) {
if (pollutionList.size() == 0) break;//no more stuff to do
ChunkCoordIntPair actualPos = pollutionList.remove(pollutionList.size() - 1);//faster
//get pollution
@@ -120,10 +129,8 @@ public class GT_Pollution {
int tPollution = currentData.getAmount();
//remove some
tPollution = (int) (0.9945f * tPollution);
- //tPollution -= 2000;//This does not really matter...
- if (tPollution <= 0) tPollution = 0;//SANity check
- else if (tPollution > 400000) {//Spread Pollution
+ if (tPollution > 400000) {//Spread Pollution
ChunkCoordIntPair[] tNeighbors = new ChunkCoordIntPair[4];//array is faster
tNeighbors[0] = (new ChunkCoordIntPair(actualPos.chunkXPos + 1, actualPos.chunkZPos));
@@ -138,7 +145,7 @@ public class GT_Pollution {
tDiff = tDiff / 20;
neighborPollution = GT_Utility.safeInt((long) neighborPollution + tDiff);//tNPol += tDiff;
tPollution -= tDiff;
- neighbor.setAmount(neighborPollution);
+ setChunkPollution(neighborPosition, neighborPollution);
}
}
@@ -200,7 +207,7 @@ public class GT_Pollution {
}
}
//Write new pollution to Hashmap !!!
- currentData.setAmount(tPollution);
+ setChunkPollution(actualPos, tPollution);
//Send new value to players nearby
if (tPollution > POLLUTIONPACKET_MINVALUE) {
@@ -210,6 +217,10 @@ public class GT_Pollution {
}
}
+ private void setChunkPollution(ChunkCoordIntPair coord, int pollution) {
+ mutatePollution(world, coord.chunkXPos, coord.chunkZPos, c -> c.setAmount(pollution), pollutedChunks);
+ }
+
private static void damageBlock(World world, int x, int y, int z, boolean sourRain) {
if (world.isRemote) return;
Block tBlock = world.getBlock(x, y, z);
@@ -265,23 +276,81 @@ public class GT_Pollution {
}
}
+ private static GT_Pollution getPollutionManager(World world) {
+ return dimensionWisePollution.computeIfAbsent(world.provider.dimensionId, i -> new GT_Pollution(world));
+ }
+
+ /** @see #addPollution(World, int, int, int) */
public static void addPollution(IGregTechTileEntity te, int aPollution) {
- addPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()), aPollution);
+ if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || te.isClientSide()) return;
+ mutatePollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4, d -> d.changeAmount(aPollution), null);
}
+ /** @see #addPollution(World, int, int, int) */
public static void addPollution(Chunk ch, int aPollution) {
- if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0) return;
- STORAGE.get(ch).changeAmount(aPollution);
+ if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || ch.worldObj.isRemote) return;
+ mutatePollution(ch.worldObj, ch.xPosition, ch.zPosition, d -> d.changeAmount(aPollution), null);
+ }
+
+ /**
+ * Add some pollution to given chunk. Can pass in negative to remove pollution.
+ * Will clamp the final pollution number to 0 if it would be changed into negative.
+ *
+ * @param w world to modify. do nothing if it's a client world
+ * @param chunkX chunk coordinate X, i.e. blockX >> 4
+ * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4
+ * @param aPollution desired delta. Positive means the pollution in chunk would go higher.
+ */
+ public static void addPollution(World w, int chunkX, int chunkZ, int aPollution) {
+ if (!GT_Mod.gregtechproxy.mPollution || aPollution == 0 || w.isRemote) return;
+ mutatePollution(w, chunkX, chunkZ, d -> d.changeAmount(aPollution), null);
+ }
+
+ private static void mutatePollution(World world, int x, int z, Consumer<ChunkData> mutator, @Nullable Set<ChunkCoordIntPair> chunks) {
+ ChunkData data = STORAGE.get(world, x, z);
+ boolean hadPollution = data.getAmount() > 0;
+ mutator.accept(data);
+ boolean hasPollution = data.getAmount() > 0;
+ if (hasPollution != hadPollution) {
+ if (chunks == null)
+ chunks = getPollutionManager(world).pollutedChunks;
+ if (hasPollution)
+ chunks.add(new ChunkCoordIntPair(x, z));
+ else
+ chunks.remove(new ChunkCoordIntPair(x, z));
+ }
}
+ /** @see #getPollution(World, int, int) */
public static int getPollution(IGregTechTileEntity te) {
- return getPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(), te.getZCoord()));
+ return getPollution(te.getWorld(), te.getXCoord() >> 4, te.getZCoord() >> 4);
}
+ /** @see #getPollution(World, int, int) */
public static int getPollution(Chunk ch) {
+ return getPollution(ch.worldObj, ch.xPosition, ch.zPosition);
+ }
+
+ /**
+ * Get the pollution in specified chunk
+ * @param w world to look in. can be a client world, but that limits the knowledge to what server side send us
+ * @param chunkX chunk coordinate X, i.e. blockX >> 4
+ * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4
+ * @return pollution amount. may be 0 if pollution is disabled, or if it's a client world and server did not send
+ * us info about this chunk
+ */
+ public static int getPollution(World w, int chunkX, int chunkZ) {
if (!GT_Mod.gregtechproxy.mPollution)
return 0;
- return STORAGE.get(ch).getAmount();
+ if (w.isRemote)
+ // it really should be querying the client side stuff instead
+ return GT_PollutionRenderer.getKnownPollution(chunkX << 4, chunkZ << 4);
+ return STORAGE.get(w, chunkX, chunkZ).getAmount();
+ }
+
+ @Deprecated
+ public static int getPollution(ChunkCoordIntPair aCh, int aDim) {
+ return getPollution(DimensionManager.getWorld(aDim), aCh.chunkXPos, aCh.chunkZPos);
}
public static boolean hasPollution(Chunk ch) {
@@ -290,12 +359,6 @@ public class GT_Pollution {
return STORAGE.isCreated(ch.worldObj, ch.getChunkCoordIntPair()) && STORAGE.get(ch).getAmount() > 0;
}
- public static int getPollution(ChunkCoordIntPair aCh, int aDim) {
- if (!GT_Mod.gregtechproxy.mPollution)
- return 0;
- return STORAGE.get(DimensionManager.getWorld(aDim), aCh.chunkXPos, aCh.chunkZPos).getAmount();
- }
-
//Add compatibility with old code
@Deprecated /*Don't use it... too weird way of passing position*/
public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution) {
@@ -323,7 +386,8 @@ public class GT_Pollution {
@SubscribeEvent
public void onWorldLoad(WorldEvent.Load e) {
// super class loads everything lazily. We force it to load them all.
- STORAGE.loadAll(e.world);
+ if (!e.world.isRemote)
+ STORAGE.loadAll(e.world);
}
}
@@ -340,15 +404,14 @@ public class GT_Pollution {
@Override
protected ChunkData readElement(DataInput input, int version, World world, int chunkX, int chunkZ) throws IOException {
+ if (version != 0)
+ throw new IOException("Region file corrupted");
ChunkData data = new ChunkData(input.readInt());
- getChunkData(world).add(new ChunkCoordIntPair(chunkX, chunkZ));
+ if (data.getAmount() > 0)
+ getPollutionManager(world).pollutedChunks.add(new ChunkCoordIntPair(chunkX, chunkZ));
return data;
}
- private List<ChunkCoordIntPair> getChunkData(World world) {
- return dimensionWisePollution.computeIfAbsent(world.provider.dimensionId, i -> new GT_Pollution(world)).chunkData;
- }
-
@Override
protected ChunkData createElement(World world, int chunkX, int chunkZ) {
return new ChunkData();
@@ -359,11 +422,6 @@ public class GT_Pollution {
super.loadAll(w);
}
- public void set(World world, ChunkCoordIntPair coord, ChunkData data) {
- set(world, coord.chunkXPos, coord.chunkZPos, data);
- getChunkData(world).add(coord);
- }
-
public boolean isCreated(World world, ChunkCoordIntPair coord) {
return isCreated(world.provider.dimensionId, coord.chunkXPos, coord.chunkZPos);
}
@@ -377,7 +435,7 @@ public class GT_Pollution {
}
private ChunkData(int amount) {
- this.amount = amount;
+ this.amount = Math.max(0, amount);
}
/**
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 40716a2fa6..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<>();
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 1571ef7b46..4ba4601490 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -595,6 +595,20 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
@Override
+ public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int[] aChances, int aDuration, int aEUt) {
+ if ((aInput == null) || (aFluidInput == null) || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sOreWasherRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+
+
+ @Override
public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -775,6 +789,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
@Override
+ public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) {
+ if ((aInput == null) || (aOutput1 == null)) {
+ return false;
+ }
+ if (!GregTech_API.sRecipeFile.get("thermalcentrifuge", aInput, true)) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, null, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+ @Override
public boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted) {
if ((aAmplifierItem == null) || (aAmplifierAmountOutputted <= 0)) {
return false;
diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java
index 21b681de4a..b725b4bbb6 100644
--- a/src/main/java/gregtech/common/GT_UndergroundOil.java
+++ b/src/main/java/gregtech/common/GT_UndergroundOil.java
@@ -31,22 +31,46 @@ public class GT_UndergroundOil {
private static final GT_UndergroundOilStore STORAGE = new GT_UndergroundOilStore();
private static final ChunkData NIL_FLUID_STACK = new ChunkData(-1, null, null, false);
+ /**
+ * Effectively just call {@code undergroundOil(te, -1)} for you
+ * @see #undergroundOil(World, int, int, float)
+ */
public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te){
return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),-1);
}
+ /**
+ * Effectively just call {@code undergroundOil(chunk, -1)} for you
+ * @see #undergroundOil(World, int, int, float)
+ */
public static FluidStack undergroundOilReadInformation(Chunk chunk) {
return undergroundOil(chunk,-1);
}
+ /** @see #undergroundOil(World, int, int, float) */
public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient){
return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),readOrDrainCoefficient);
}
//Returns whole content for information purposes -> when drainSpeedCoefficient < 0
//Else returns extracted fluidStack if amount > 0, or null otherwise
+ /** @see #undergroundOil(World, int, int, float) */
public static FluidStack undergroundOil(Chunk chunk, float readOrDrainCoefficient) {
- ChunkData chunkData = STORAGE.get(chunk);
+ return undergroundOil(chunk.worldObj, chunk.xPosition, chunk.zPosition, readOrDrainCoefficient);
+ }
+
+ /**
+ * Pump fluid or read info.
+ * @param w a remote World. For a WorldClient it will always tell you null
+ * @param chunkX chunk coordinate X, i.e. blockX >> 4
+ * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4
+ * @param readOrDrainCoefficient how fast to pump. The higher the faster. use negative to read expected current output
+ * @return null if nothing here, or depleted already, or a client side world
+ */
+ public static FluidStack undergroundOil(World w, int chunkX, int chunkZ, float readOrDrainCoefficient) {
+ if (w.isRemote)
+ return null; // troublemakers go away
+ ChunkData chunkData = STORAGE.get(w, chunkX, chunkZ);
if (chunkData.getVein() == null || chunkData.getFluid() == null) // nothing here...
return null;
//do stuff on it if needed
@@ -102,7 +126,7 @@ public class GT_UndergroundOil {
ChunkData chunkData = STORAGE.get(e.getChunk());
Fluid fluid = chunkData.getFluid();
if (fluid != null && fluid.getID() == e.getData().getInteger("GTOILFLUID"))
- chunkData.setAmount(Math.min(0, Math.min(chunkData.getAmount(), e.getData().getInteger("GTOIL"))));
+ chunkData.setAmount(Math.min(chunkData.getAmount(), e.getData().getInteger("GTOIL")));
}
}
@@ -250,7 +274,7 @@ public class GT_UndergroundOil {
public void changeAmount(int delta) {
if (delta != 0)
dirty = true;
- this.amount = Math.max(0, amount - delta);
+ this.amount = Math.max(amount + delta, 0);
}
@Nullable
@@ -272,7 +296,7 @@ public class GT_UndergroundOil {
@Override
public boolean isSameAsDefault() {
- return dirty;
+ return !dirty;
}
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index 55743f445d..b59dd1d848 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -30,10 +30,12 @@ import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidContainerItem;
import java.util.List;
-public class GT_Item_Machines extends ItemBlock {
+public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem {
private static final String[] directionNames = {"Bottom", "Top", "North", "South", "West", "East"};
@@ -89,6 +91,15 @@ public class GT_Item_Machines extends ItemBlock {
}
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(tTileEntity.getEUCapacity()) + EnumChatFormatting.GRAY);
}
+ if (GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_QuantumTank || GregTech_API.METATILEENTITIES[tDamage] instanceof GT_MetaTileEntity_SuperTank) {
+ if (aStack.hasTagCompound() && aStack.stackTagCompound.hasKey("mFluid")) {
+ FluidStack tContents = FluidStack.loadFluidStackFromNBT(aStack.stackTagCompound.getCompoundTag("mFluid"));
+ if (tContents != null && tContents.amount > 0) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_TANK_INFO", "Contains Fluid: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.YELLOW + tContents.getLocalizedName() + EnumChatFormatting.GRAY);
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_TANK_AMOUNT", "Fluid Amount: ", !GregTech_API.sPostloadFinished ) + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(tContents.amount) + " L" + EnumChatFormatting.GRAY);
+ }
+ }
+ }
}
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
@@ -240,4 +251,82 @@ public class GT_Item_Machines extends ItemBlock {
}
}
}
+
+ @Override
+ public FluidStack getFluid(ItemStack container) {
+ if (container != null) {
+ NBTTagCompound tNBT = container.stackTagCompound;
+ if (tNBT != null && tNBT.hasKey("mFluid", 10)) {
+ return FluidStack.loadFluidStackFromNBT(tNBT.getCompoundTag("mFluid"));
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public int getCapacity(ItemStack container) {
+ if (container != null) {
+ int tDamage = container.getItemDamage();
+ IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage];
+ if (tMetaTile != null)
+ return tMetaTile.getCapacity();
+ }
+ return 0;
+ }
+
+ @Override
+ public int fill(ItemStack container, FluidStack resource, boolean doFill) {
+ if (container != null && resource != null) {
+ int tDamage = container.getItemDamage();
+ IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage];
+ if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) {
+ return 0;
+ }
+ if (container.stackTagCompound == null) container.stackTagCompound = new NBTTagCompound();
+ FluidStack tStoredFluid = getFluid(container);
+ int tCapacity = getCapacity(container);
+ if (tCapacity <= 0) return 0;
+ if (tStoredFluid != null && tStoredFluid.isFluidEqual(resource)) {
+ int tAmount = Math.min(tCapacity - tStoredFluid.amount, resource.amount);
+ if (doFill) {
+ FluidStack tNewFluid = new FluidStack(tStoredFluid, tAmount + tStoredFluid.amount);
+ container.stackTagCompound.setTag("mFluid", tNewFluid.writeToNBT(new NBTTagCompound()));
+ }
+ return tAmount;
+ }
+ if (tStoredFluid == null) {
+ int tAmount = Math.min(tCapacity, resource.amount);
+ if (doFill) {
+ FluidStack tNewFluid = new FluidStack(resource, tAmount);
+ container.stackTagCompound.setTag("mFluid", tNewFluid.writeToNBT(new NBTTagCompound()));
+ }
+ return tAmount;
+ }
+ }
+ return 0;
+ }
+
+ @Override
+ public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain) {
+ if (container != null) {
+ int tDamage = container.getItemDamage();
+ IMetaTileEntity tMetaTile = GregTech_API.METATILEENTITIES[tDamage];
+ if (!(tMetaTile instanceof GT_MetaTileEntity_QuantumTank || tMetaTile instanceof GT_MetaTileEntity_SuperTank)) {
+ return null;
+ }
+ if (container.stackTagCompound == null) container.stackTagCompound = new NBTTagCompound();
+ FluidStack tStoredFluid = getFluid(container);
+ if (tStoredFluid != null) {
+ int tAmount = Math.min(maxDrain, tStoredFluid.amount);
+ FluidStack tNewFluid = new FluidStack(tStoredFluid, tStoredFluid.amount - tAmount);
+ FluidStack tOutputFluid = new FluidStack(tStoredFluid, tAmount);
+ if (doDrain) {
+ if (tNewFluid.amount <= 0) container.stackTagCompound.removeTag("mFluid");
+ else container.stackTagCompound.setTag("mFluid", tNewFluid.writeToNBT(new NBTTagCompound()));
+ }
+ return tOutputFluid;
+ }
+ }
+ return null;
+ }
}
diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
index 9cbdb2b832..4b7d294a25 100644
--- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
+++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java
@@ -33,6 +33,9 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item {
ItemList.Circuit_Integrated.set(this);
+ for (int i = 1; i <= 24; i++) {
+ GregTech_API.registerConfigurationCircuit(new ItemStack(this, 0, i));
+ }
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Integrated.getWithDamage(1L, 0L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.circuit.get(Materials.Basic)});
long bits = GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index e7f846d9b0..4501efb20c 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -58,10 +58,11 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
private static final String aTextStick = " S ";
private static final String aTextFeather = "F ";
private static final String aTextEmptyRow = " "; private static final String aTextShape = " P ";
- private static final String PartCoverText = " L/sec (as Cover)";
+ private static final String PartCoverText = " L/t (";
+ private static final String PartCoverText2 = " L/s) as Cover";
private static final String PartNotCoverText = "Cannot be used as a Cover";
private static final String RAText = "Grabs from and inserts into specific slots";
- private static final String FRText1 = "Configuable up to ";
+ private static final String FRText1 = "Configurable up to ";
private static final String FRText2 = " L/sec (as Cover)/n Rightclick/Screwdriver-rightclick/Shift-screwdriver-rightclick/n to adjust the pump speed by 1/16/256 L/sec per click";
public GT_MetaGenerated_Item_01() {
@@ -541,16 +542,16 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.Titanium), 'S', OrePrefixes.stick.get(Materials.Titanium), 'G', OrePrefixes.gearGtSmall.get(Materials.Titanium), 'M', ItemList.Electric_Motor_EV, 'C', OrePrefixes.cableGt01.get(Materials.Aluminium)});
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Piston_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'S', OrePrefixes.stick.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGtSmall.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'C', OrePrefixes.cableGt01.get(Materials.Tungsten)});
- ItemList.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", GT_Utility.formatNumbers(640) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)));
- ItemList.Electric_Pump_MV.set(addItem(611, "Electric Pump (MV)", GT_Utility.formatNumbers(2560) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)));
- ItemList.Electric_Pump_HV.set(addItem(612, "Electric Pump (HV)", GT_Utility.formatNumbers(10240) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)));
- ItemList.Electric_Pump_EV.set(addItem(613, "Electric Pump (EV)", GT_Utility.formatNumbers(40960) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)));
- ItemList.Electric_Pump_IV.set(addItem(614, "Electric Pump (IV)", GT_Utility.formatNumbers(163840) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)));
- ItemList.Electric_Pump_LuV.set(addItem(615, "Electric Pump (LuV)", GT_Utility.formatNumbers(655360) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L)));
- ItemList.Electric_Pump_ZPM.set(addItem(616, "Electric Pump (ZPM)", GT_Utility.formatNumbers(2621440) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L)));
- ItemList.Electric_Pump_UV.set(addItem(617, "Electric Pump (UV)", GT_Utility.formatNumbers(10485760) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L)));
- ItemList.Electric_Pump_UHV.set(addItem(618, "Electric Pump (UHV)", GT_Utility.formatNumbers(20971520) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L)));
- ItemList.Electric_Pump_UEV.set(addItem(619, "Electric Pump (UEV)", GT_Utility.formatNumbers(41943040) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
+ ItemList.Electric_Pump_LV.set(addItem(610, "Electric Pump (LV)", GT_Utility.formatNumbers(32) + PartCoverText + GT_Utility.formatNumbers(32 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)));
+ ItemList.Electric_Pump_MV.set(addItem(611, "Electric Pump (MV)", GT_Utility.formatNumbers(128) + PartCoverText + GT_Utility.formatNumbers(128 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)));
+ ItemList.Electric_Pump_HV.set(addItem(612, "Electric Pump (HV)", GT_Utility.formatNumbers(512) + PartCoverText + GT_Utility.formatNumbers(512 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)));
+ ItemList.Electric_Pump_EV.set(addItem(613, "Electric Pump (EV)", GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)));
+ ItemList.Electric_Pump_IV.set(addItem(614, "Electric Pump (IV)", GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)));
+ ItemList.Electric_Pump_LuV.set(addItem(615, "Electric Pump (LuV)", GT_Utility.formatNumbers(32768) + PartCoverText + GT_Utility.formatNumbers(32768 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 32L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 32L)));
+ ItemList.Electric_Pump_ZPM.set(addItem(616, "Electric Pump (ZPM)", GT_Utility.formatNumbers(131072) + PartCoverText + GT_Utility.formatNumbers(131072 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 64L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 64L)));
+ ItemList.Electric_Pump_UV.set(addItem(617, "Electric Pump (UV)", GT_Utility.formatNumbers(524288) + PartCoverText + GT_Utility.formatNumbers(524288 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 128L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 128L)));
+ ItemList.Electric_Pump_UHV.set(addItem(618, "Electric Pump (UHV)", GT_Utility.formatNumbers(1048576) + PartCoverText + GT_Utility.formatNumbers(1048576 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 256L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 256L)));
+ ItemList.Electric_Pump_UEV.set(addItem(619, "Electric Pump (UEV)", GT_Utility.formatNumbers(2097152) + PartCoverText + GT_Utility.formatNumbers(2097152 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
ItemList.Electric_Pump_UIV.set(addItem(27, "Electric Pump (UIV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
ItemList.Electric_Pump_UMV.set(addItem(28, "Electric Pump (UMV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
ItemList.Electric_Pump_UXV.set(addItem(29, "Electric Pump (UXV)", PartNotCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 512L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 512L)));
@@ -574,11 +575,11 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_EV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_EV, 'O', OrePrefixes.ring.get(Materials.AnyRubber), 'X', OrePrefixes.rotor.get(Materials.StainlessSteel), 'S', OrePrefixes.screw.get(Materials.StainlessSteel), 'W', OrePrefixes.cableGt01.get(Materials.Aluminium), 'P', OrePrefixes.pipeMedium.get(Materials.Titanium)});
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_IV.get(1L), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", 'M', ItemList.Electric_Motor_IV, 'O', OrePrefixes.ring.get(Materials.AnySyntheticRubber), 'X', OrePrefixes.rotor.get(Materials.TungstenSteel), 'S', OrePrefixes.screw.get(Materials.TungstenSteel), 'W', OrePrefixes.cableGt01.get(Materials.Tungsten), 'P', OrePrefixes.pipeMedium.get(Materials.TungstenSteel)});
- ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", GT_Utility.formatNumbers(20480) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)));
- ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", GT_Utility.formatNumbers(40960) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)));
- ItemList.Steam_Valve_HV.set(addItem(622, "Steam Valve (HV)", GT_Utility.formatNumbers(81920) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)));
- ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", GT_Utility.formatNumbers(163840) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)));
- ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", GT_Utility.formatNumbers(327680) + PartCoverText, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)));
+ ItemList.Steam_Valve_LV.set(addItem(620, "Steam Valve (LV)", GT_Utility.formatNumbers(1024) + PartCoverText + GT_Utility.formatNumbers(1024 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L)));
+ ItemList.Steam_Valve_MV.set(addItem(621, "Steam Valve (MV)", GT_Utility.formatNumbers(2048) + PartCoverText + GT_Utility.formatNumbers(2048 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 2L)));
+ ItemList.Steam_Valve_HV.set(addItem(622, "Steam Valve (HV)", GT_Utility.formatNumbers(4096) + PartCoverText + GT_Utility.formatNumbers(4096 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 4L)));
+ ItemList.Steam_Valve_EV.set(addItem(623, "Steam Valve (EV)", GT_Utility.formatNumbers(8192) + PartCoverText + GT_Utility.formatNumbers(8192 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 8L)));
+ ItemList.Steam_Valve_IV.set(addItem(624, "Steam Valve (IV)", GT_Utility.formatNumbers(16384) + PartCoverText + GT_Utility.formatNumbers(16384 * 20) + PartCoverText2, new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L)));
GregTech_API.registerCover(ItemList.Steam_Valve_LV.get(1L), TextureFactory.of(MACHINE_CASINGS[1][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(1024));
GregTech_API.registerCover(ItemList.Steam_Valve_MV.get(1L), TextureFactory.of(MACHINE_CASINGS[2][0], TextureFactory.of(OVERLAY_VALVE)), new GT_Cover_SteamValve(2048));
diff --git a/src/main/java/gregtech/common/render/GT_PollutionRenderer.java b/src/main/java/gregtech/common/render/GT_PollutionRenderer.java
index 4353786a7b..5128af1c36 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;
@@ -100,6 +101,10 @@ public class GT_PollutionRenderer {
return color(oColor, pollutionMap.getPollution(x, z)/1000, 300, 500, foliageColor);
}
+ public static int getKnownPollution(int x, int z) {
+ return pollutionMap.getPollution(x, z);
+ }
+
@SubscribeEvent(priority = EventPriority.LOW)
public void manipulateColor(EntityViewRenderEvent.FogColors event) {
if (!DEBUG && Minecraft.getMinecraft().thePlayer.capabilities.isCreativeMode)
@@ -122,6 +127,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 +145,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 +203,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, aNameRegional, new String[]{
"A Boiler running off Lava",
"Produces " + PRODUCTION_PER_SECOND + "L of Steam per second",
- "Causes " + POLLUTION_PER_SECOND + " Pollution per second",
+ "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond) + " Pollution per second",
"Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) + "L of Lava every " + COOLDOWN_INTERVAL + " ticks when fully heat up"});
}
@@ -98,7 +98,7 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
@Override
protected int getPollution() {
- return POLLUTION_PER_SECOND;
+ return GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index ab51156868..98546ff09e 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.boilers;
+import gregtech.GT_Mod;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -24,7 +25,7 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
super(aID, aName, aNameRegional, new String[]{
"Faster than the Bronze Boiler",
"Produces 300L of Steam per second",
- "Causes 30 Pollution per second"});
+ "Causes "+Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond)+" Pollution per second"});
}
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@@ -81,7 +82,7 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
@Override
protected int getPollution() {
- return 30;
+ return GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
index 606af204e9..f025ed34ec 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
@@ -1,6 +1,7 @@
package gregtech.common.tileentities.generators;
import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.ItemList;
@@ -19,14 +20,14 @@ import static gregtech.api.enums.Textures.BlockIcons.*;
public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGenerator {
- public static final int BASE_POLLUTION = 2;
+
public int mEfficiency;
public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, new String[]{
"Requires liquid Fuel",
- "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
+ "Causes " + (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[aTier]) + " Pollution per second"});
onConfigLoad();
}
@@ -165,6 +166,6 @@ public class GT_MetaTileEntity_DieselGenerator extends GT_MetaTileEntity_BasicGe
@Override
public int getPollution() {
- return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1));
+ return (int) (GT_Mod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond * GT_Mod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier[mTier]);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
index 02b42e2b2f..a0f6aeee64 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.generators;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.interfaces.ITexture;
@@ -12,14 +13,14 @@ import gregtech.api.util.GT_Recipe;
import static gregtech.api.enums.Textures.BlockIcons.*;
public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerator {
- public static final int BASE_POLLUTION = 1;
+
public int mEfficiency;
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, new String[]{
"Requires flammable Gasses",
- "Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
+ "Causes " + (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[aTier]) + " Pollution per second"});
onConfigLoad();
}
@@ -137,6 +138,6 @@ public class GT_MetaTileEntity_GasTurbine extends GT_MetaTileEntity_BasicGenerat
@Override
public int getPollution() {
- return (int) (BASE_POLLUTION * Math.pow(2, mTier - 1));
+ return (int) (GT_Mod.gregtechproxy.mPollutionBaseGasTurbinePerSecond * GT_Mod.gregtechproxy.mPollutionGasTurbineReleasedByTier[mTier]);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index 5516b355fd..04dcdbe6b1 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -72,6 +72,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
private static int sEnergyPerEssentia = 320;
private static final Map<Aspect, Integer> sAspectsEnergy = new HashMap<>();
private static int sDragonEggEnergyPerTick = 2048;
+ private static int sCreeperEggEnergyPerTick = 512;
private int mEfficiency;
private int mMaxVisPerDrain;
private final MagicalEnergyBB mMagicalEnergyBB = new MagicalEnergyBB(this, mTier, mTier + 2);
@@ -96,6 +97,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
private static void sharedConfigLoad(GT_Config aConfig) {
sAllowMultipleEggs = aConfig.get(machineconfig, "MagicEnergyAbsorber.AllowMultipleEggs", false);
sDragonEggEnergyPerTick = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerTick.DragonEgg", 2048);
+ sCreeperEggEnergyPerTick = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerTick.CreeperEgg", 512);
sEnergyPerEndercrystal = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerTick.EnderCrystal", 512);
if (THAUMCRAFT_LOADED) {
sEnergyFromVis = aConfig.get(machineconfig, "MagicEnergyAbsorber.EnergyPerVis", 20);
@@ -422,7 +424,13 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
setActiveSiphon(this);
}
}
- return sDragonEggEnergyPerTick;
+ Block egg = getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
+ if (egg == Blocks.dragon_egg) {
+ return sDragonEggEnergyPerTick;
+ } else if (egg.getUnlocalizedName().contains("creeperEgg")) {
+ return sCreeperEggEnergyPerTick;
+ }
+ return 0;
}
private long absorbFromEnderCrystals() {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
index 42c8db6722..b6ff782cfb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -95,7 +95,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}else if(aStack.getItem() == Ic2Items.dynamite.getItem()){
aStack.stackSize -= 4;
}else if(aStack.getItem() == ItemList.Block_Powderbarrel.getItem() && aStack.getItemDamage()==ItemList.Block_Powderbarrel.get(1).getItemDamage()){
- aStack.stackSize -=8;
+ aStack.stackSize -= 8;
}else{
aStack.stackSize -= 1;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java
index 2409c1660c..af6afbc4c4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AbstractMultiFurnace.java
@@ -35,11 +35,6 @@ public abstract class GT_MetaTileEntity_AbstractMultiFurnace<T extends GT_MetaTi
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 20;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index c2460213c8..ac152ac09d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -385,11 +385,6 @@ public class GT_MetaTileEntity_AssemblyLine extends GT_MetaTileEntity_EnhancedMu
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
index 446965f3b6..617c191562 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.enums.Textures.BlockIcons;
@@ -34,7 +35,7 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
.addInfo("Controller Block for the Bricked Blast Furnace")
.addInfo("Usable for Steel and general Pyrometallurgy")
.addInfo("Has a useful interface, unlike other gregtech multis")
- .addPollutionAmount(200)
+ .addPollutionAmount(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond)
.addSeparator()
.beginStructureBlock(3, 4, 3, true)
.addController("Front center")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
index 058d5f3487..d4126cf74c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.interfaces.ITexture;
@@ -69,7 +70,9 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
mEfficiency = 10000;
mEfficiencyIncrease = 10000;
mMaxProgresstime = Math.max(1, mMaxProgresstime);
- GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime * 10);
+
+ //adds all the pollution at once when the recipe starts
+ GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime * getPollutionPerTick(null));
return true;
} else {
mEfficiency = 0;
@@ -199,8 +202,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return GT_Mod.gregtechproxy.mPollutionCharcoalPitPerSecond;
}
@Override
@@ -230,7 +233,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
.addInfo("Controller for the Charcoal Pit")
.addInfo("Converts Logs into Brittle Charcoal blocks")
.addInfo("Will automatically start when valid")
- .addPollutionAmount(100)
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false)
.addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index e58ec25bd0..1edcad540d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -352,11 +352,6 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
index c6a30ad085..d26a29652f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java
@@ -2,6 +2,7 @@ package gregtech.common.tileentities.machines.multi;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -78,7 +79,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu
.addInfo("Default: Produces 2048EU/t at 100% fuel efficiency")
.addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency")
.addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 3, 4, false)
.addController("Front center")
@@ -264,10 +265,10 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_EnhancedMu
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 24;
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return GT_Mod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond;
}
-
+
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return true;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index fe68b13152..f83f6aa11d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -250,11 +250,6 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index 010d1558be..408b2441fc 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -429,11 +429,6 @@ public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_En
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index 43498a59fe..3acf59b93e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -3,6 +3,7 @@ package gregtech.common.tileentities.machines.multi;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.Materials;
@@ -18,7 +19,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_StructureUtility;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -88,7 +88,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab
.addInfo("Each 1800K over the min. Heat required allows for one upgraded overclock instead of normal")
.addInfo("Upgraded overclocks reduce recipe time to 25% (instead of 50%) and increase EU/t to 400%")
.addInfo("Additionally gives +100K for every tier past MV")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 4, 3, true)
.addController("Front bottom")
@@ -129,6 +129,11 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab
}
@Override
+ public int getPollutionPerSecond(ItemStack aStack){
+ return GT_Mod.gregtechproxy.mPollutionEBFPerSecond;
+ }
+
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return GT_Recipe.GT_Recipe_Map.sBlastRecipes;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
index 8c3d474b8b..4d978ecc6e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -44,7 +45,7 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
.addInfo("Default: Produces 8192EU/t at 100% fuel efficiency")
.addInfo("Boosted: Produces 32768EU/t at 400% fuel efficiency")
.addInfo("You need to wait for it to reach 400% to output full power")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 3, 4, false)
.addController("Front center")
@@ -158,8 +159,8 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return super.getPollutionPerTick(aStack) * 8;
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return GT_Mod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 3536030fe0..be605e9249 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -431,11 +431,6 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index fa96971a07..18dfb32351 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -276,11 +276,6 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_EnhancedM
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index b71d01ec07..b6ee628f2e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -1,6 +1,7 @@
package gregtech.common.tileentities.machines.multi;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.enums.Textures.BlockIcons;
@@ -45,7 +46,7 @@ public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_Cub
tt.addMachineType("Implosion Compressor")
.addInfo("Explosions are fun")
.addInfo("Controller block for the Implosion Compressor")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 3, 3, true)
.addController("Front center")
@@ -163,10 +164,9 @@ public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_Cub
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 500;
+ public int getPollutionPerSecond(ItemStack aStack){
+ return GT_Mod.gregtechproxy.mPollutionImplosionCompressorPerSecond;
}
-
@Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 2599d238a9..c9b2c6d467 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -73,6 +73,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En
private int excessProjectedEU = 0; //Eliminate rounding errors from throttling the boiler
private int mCasingAmount;
private int mFireboxAmount;
+ protected int pollutionPerSecond = 1; //placeholder for the child classes
public GT_MetaTileEntity_LargeBoiler(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -90,7 +91,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En
.addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//?
.addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
.addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 5, 3, false)
.addController("Front bottom")
@@ -132,6 +133,16 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En
public abstract int getEfficiencyIncrease();
+ public int getIntegratedCircuitConfig(){
+ return integratedCircuitConfig;
+ }
+
+ @Override
+ public int getPollutionPerSecond(ItemStack aStack) {
+ //allows for 0 pollution if circuit throttle is too high
+ return Math.max(0, (int) (pollutionPerSecond * (1-GT_Mod.gregtechproxy.mPollutionReleasedByThrottle*getIntegratedCircuitConfig())));
+ }
+
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
@@ -301,12 +312,6 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_En
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
- return Math.max(1, 12 * adjustedEUOutput / getEUt());
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
index 9aeff9b3d0..fda98a431f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
@@ -1,24 +1,29 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_LargeBoiler_Bronze extends GT_MetaTileEntity_LargeBoiler {
+
public GT_MetaTileEntity_LargeBoiler_Bronze(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond;
}
public GT_MetaTileEntity_LargeBoiler_Bronze(String aName) {
super(aName);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Bronze(this.mName);
}
-
+
@Override
public String getCasingMaterial(){
return "Bronze";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
index d1188955f4..583f26082c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
@@ -1,24 +1,28 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_LargeBoiler_Steel extends GT_MetaTileEntity_LargeBoiler {
public GT_MetaTileEntity_LargeBoiler_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond;
}
public GT_MetaTileEntity_LargeBoiler_Steel(String aName) {
super(aName);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Steel(this.mName);
}
-
+
@Override
public String getCasingMaterial(){
return "Steel";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
index e67cf64723..01f59d1f99 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
@@ -1,24 +1,28 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_LargeBoiler_Titanium extends GT_MetaTileEntity_LargeBoiler {
public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond;
}
public GT_MetaTileEntity_LargeBoiler_Titanium(String aName) {
super(aName);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Titanium(this.mName);
}
-
+
@Override
public String getCasingMaterial(){
return "Titanium";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
index 78e7d25752..b14ce3e5f0 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
@@ -1,24 +1,28 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
+import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_LargeBoiler_TungstenSteel extends GT_MetaTileEntity_LargeBoiler {
public GT_MetaTileEntity_LargeBoiler_TungstenSteel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond;
}
public GT_MetaTileEntity_LargeBoiler_TungstenSteel(String aName) {
super(aName);
+ pollutionPerSecond = GT_Mod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond;
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_TungstenSteel(this.mName);
}
-
+
@Override
public String getCasingMaterial(){
return "TungstenSteel";
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 87eddb7e13..97695ac2b8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -246,11 +246,6 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
index 20f795572e..ca2ecbbbc1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java
@@ -1,5 +1,6 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -41,7 +42,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
tt.addMachineType("Gas Turbine")
.addInfo("Controller block for the Large Gas Turbine")
.addInfo("Needs a Turbine, place inside controller")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 3, 4, true)
.addController("Front center")
@@ -82,8 +83,8 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 15;
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return GT_Mod.gregtechproxy.mPollutionLargeGasTurbinePerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index 2c803712f1..b34662e619 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -83,11 +83,6 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
if (looseFit) {
aOptFlow *= 4;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
index 76c5533c09..b32385c1be 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
@@ -89,11 +89,6 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
if (aFluids.size() >= 1) {
aOptFlow *= 800;//CHANGED THINGS HERE, check recipe runs once per 20 ticks
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 356dda9183..651d9c9d09 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -85,11 +85,6 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
return 16;
}
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
private int condenseSteam(int steam) {
excessWater += steam;
int water = excessWater / STEAM_PER_WATER;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index 37f56deef5..cd07476194 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -3,6 +3,7 @@ package gregtech.common.tileentities.machines.multi;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -74,7 +75,7 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu
.addInfo("Controller Block for the Multi Smelter")
.addInfo("Smelts up to 8-128 items at once")
.addInfo("Items smelted increases with coil tier")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(3, 3, 3, true)
.addController("Front bottom")
@@ -113,6 +114,11 @@ public class GT_MetaTileEntity_MultiFurnace extends GT_MetaTileEntity_AbstractMu
}
@Override
+ public int getPollutionPerSecond(ItemStack aStack){
+ return GT_Mod.gregtechproxy.mPollutionMultiSmelterPerSecond;
+ }
+
+ @Override
public boolean checkRecipe(ItemStack aStack) {
ArrayList<ItemStack> tInputList = getStoredInputs();
if (tInputList.isEmpty())
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
index b9ade288c1..10b94fc254 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
@@ -273,11 +273,6 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
index 61fb394841..84d200d4f9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
@@ -234,7 +234,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(),
new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(),
this.getBaseMetaTileEntity().getZCoord()),
- 200);
+ GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond);
}
aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index a48f63c60a..44f93eb3db 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -410,11 +410,6 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_CubicMu
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index 9542c54ce0..18eda558a0 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -4,6 +4,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.common.Loader;
+import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.Textures;
@@ -91,7 +92,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu
.addInfo("Processing speed scales linearly with Coil tier:")
.addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.")
.addInfo("EU/t is not affected by Coil tier")
- .addPollutionAmount(20 * getPollutionPerTick(null))
+ .addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
.beginStructureBlock(5, 4, 5, true)
.addController("Front center")
@@ -225,8 +226,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMu
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 30;
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return GT_Mod.gregtechproxy.mPollutionPyrolyseOvenPerSecond;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
index 843f2ff337..f476e78310 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java
@@ -143,11 +143,6 @@ public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_CubicMult
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}