aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorAlexdoru <57050655+Alexdoru@users.noreply.github.com>2024-10-21 21:21:33 +0200
committerGitHub <noreply@github.com>2024-10-21 19:21:33 +0000
commit901cb0d294b0c4f114bb247fbd7d6f97e7484f3c (patch)
treefd4900d59f98ec34c9119c2003f79f7467abddf0 /src/main/java/gregtech/common
parente741976ea6a6fa5dbcb45813fd1e2ca368331ba5 (diff)
downloadGT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.gz
GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.bz2
GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.zip
Import pollution mixins from hodgepodge (#3395)
Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GTClient.java4
-rw-r--r--src/main/java/gregtech/common/GTProxy.java1
-rw-r--r--src/main/java/gregtech/common/config/Gregtech.java127
-rw-r--r--src/main/java/gregtech/common/misc/GTCommand.java2
-rw-r--r--src/main/java/gregtech/common/pollution/BlockMatcher.java96
-rw-r--r--src/main/java/gregtech/common/pollution/ColorOverrideType.java28
-rw-r--r--src/main/java/gregtech/common/pollution/EntityFXPollution.java (renamed from src/main/java/gregtech/common/entities/EntityFXPollution.java)2
-rw-r--r--src/main/java/gregtech/common/pollution/GTClientPollutionMap.java (renamed from src/main/java/gregtech/common/misc/GTClientPollutionMap.java)2
-rw-r--r--src/main/java/gregtech/common/pollution/Pollution.java (renamed from src/main/java/gregtech/common/Pollution.java)32
-rw-r--r--src/main/java/gregtech/common/pollution/PollutionConfig.java397
-rw-r--r--src/main/java/gregtech/common/pollution/PollutionRenderer.java (renamed from src/main/java/gregtech/common/render/PollutionRenderer.java)4
-rw-r--r--src/main/java/gregtech/common/pollution/PollutionTooltip.java108
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/MTEBoiler.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/MTEBoilerBronze.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/MTECharcoalPit.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/MTEPrimitiveBlastFurnace.java2
16 files changed, 670 insertions, 141 deletions
diff --git a/src/main/java/gregtech/common/GTClient.java b/src/main/java/gregtech/common/GTClient.java
index 844731e82f..7cd673c001 100644
--- a/src/main/java/gregtech/common/GTClient.java
+++ b/src/main/java/gregtech/common/GTClient.java
@@ -92,6 +92,8 @@ import gregtech.client.GTMouseEventHandler;
import gregtech.client.SeekingOggCodec;
import gregtech.common.blocks.BlockFrameBox;
import gregtech.common.blocks.ItemMachines;
+import gregtech.common.pollution.Pollution;
+import gregtech.common.pollution.PollutionRenderer;
import gregtech.common.render.BlackholeRenderer;
import gregtech.common.render.DroneRender;
import gregtech.common.render.FlaskRenderer;
@@ -101,7 +103,6 @@ import gregtech.common.render.GTRendererBlock;
import gregtech.common.render.LaserRenderer;
import gregtech.common.render.MetaGeneratedToolRenderer;
import gregtech.common.render.MultiTileRenderer;
-import gregtech.common.render.PollutionRenderer;
import gregtech.common.render.WormholeRenderer;
import gregtech.common.render.items.DataStickRenderer;
import gregtech.common.render.items.InfiniteSprayCanRenderer;
@@ -670,6 +671,7 @@ public class GTClient extends GTProxy implements Runnable {
.forEach(CoverBehaviorBase::reloadColorOverride);
}
});
+ Pollution.onPostInitClient();
}
@Override
diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java
index 643811234d..e7cb627c91 100644
--- a/src/main/java/gregtech/common/GTProxy.java
+++ b/src/main/java/gregtech/common/GTProxy.java
@@ -167,6 +167,7 @@ import gregtech.common.items.MetaGeneratedTool01;
import gregtech.common.misc.GlobalEnergyWorldSavedData;
import gregtech.common.misc.GlobalMetricsCoverDatabase;
import gregtech.common.misc.spaceprojects.SpaceProjectWorldSavedData;
+import gregtech.common.pollution.Pollution;
import gregtech.common.tileentities.machines.multi.drone.MTEDroneCentre;
import gregtech.nei.GTNEIDefaultHandler;
diff --git a/src/main/java/gregtech/common/config/Gregtech.java b/src/main/java/gregtech/common/config/Gregtech.java
index a293b6cba7..e852a6b022 100644
--- a/src/main/java/gregtech/common/config/Gregtech.java
+++ b/src/main/java/gregtech/common/config/Gregtech.java
@@ -27,9 +27,6 @@ public class Gregtech {
@Config.Comment("Ore drop behavior section")
public static final OreDropBehavior oreDropBehavior = new OreDropBehavior();
- @Config.Comment("Pollution section")
- public static final Pollution pollution = new Pollution();
-
@Config.LangKey("GT5U.gui.config.gregtech.debug")
public static class Debug {
@@ -558,128 +555,4 @@ public class Gregtech {
@Config.RequiresMcRestart
public GTProxy.OreDropSystem setting = GTProxy.OreDropSystem.FortuneItem;
}
-
- @Config.LangKey("GT5U.gui.config.gregtech.pollution")
- public static class Pollution {
-
- @Config.Comment("if true, enables pollution in the game.")
- @Config.DefaultBoolean(true)
- @Config.RequiresMcRestart
- public boolean pollution;
-
- @Config.Comment("Controls the threshold starting from which you can see fog.")
- @Config.DefaultInt(550_000)
- @Config.RequiresMcRestart
- public int pollutionSmogLimit;
- @Config.Comment("Controls the threshold starting from which players get poison effect.")
- @Config.DefaultInt(750_000)
- @Config.RequiresMcRestart
- public int pollutionPoisonLimit;
- @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.")
- @Config.DefaultInt(1_000_000)
- @Config.RequiresMcRestart
- public int pollutionVegetationLimit;
- @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.")
- @Config.DefaultInt(2_000_000)
- @Config.RequiresMcRestart
- public int pollutionSourRainLimit;
- @Config.Comment("Controls the pollution released by an explosion.")
- @Config.DefaultInt(100_000)
- @Config.RequiresMcRestart
- public int pollutionOnExplosion;
- @Config.Comment("Controls the pollution released per second by the bricked blast furnace.")
- @Config.DefaultInt(200)
- @Config.RequiresMcRestart
- public int pollutionPrimitveBlastFurnacePerSecond;
- @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.")
- @Config.DefaultInt(100)
- @Config.RequiresMcRestart
- public int pollutionCharcoalPitPerSecond;
- @Config.Comment("Controls the pollution released per second by the EBF.")
- @Config.DefaultInt(400)
- @Config.RequiresMcRestart
- public int pollutionEBFPerSecond;
- @Config.Comment("Controls the pollution released per second by the large combustion engine.")
- @Config.DefaultInt(480)
- @Config.RequiresMcRestart
- public int pollutionLargeCombustionEnginePerSecond;
- @Config.Comment("Controls the pollution released per second by the extreme combustion engine.")
- @Config.DefaultInt(3_840)
- @Config.RequiresMcRestart
- public int pollutionExtremeCombustionEnginePerSecond;
- @Config.Comment("Controls the pollution released per second by the implosion compressor.")
- @Config.DefaultInt(10_000)
- @Config.RequiresMcRestart
- public int pollutionImplosionCompressorPerSecond;
- @Config.Comment("Controls the pollution released per second by the large bronze boiler.")
- @Config.DefaultInt(1_000)
- @Config.RequiresMcRestart
- public int pollutionLargeBronzeBoilerPerSecond;
- @Config.Comment("Controls the pollution released per second by the large steel boiler.")
- @Config.DefaultInt(2_000)
- @Config.RequiresMcRestart
- public int pollutionLargeSteelBoilerPerSecond;
- @Config.Comment("Controls the pollution released per second by the large titanium boiler.")
- @Config.DefaultInt(3_000)
- @Config.RequiresMcRestart
- public int pollutionLargeTitaniumBoilerPerSecond;
- @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.")
- @Config.DefaultInt(4_000)
- @Config.RequiresMcRestart
- public int pollutionLargeTungstenSteelBoilerPerSecond;
- @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.")
- @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs.
- @Config.RequiresMcRestart
- public float pollutionReleasedByThrottle;
- @Config.Comment("Controls the pollution released per second by the large gas turbine.")
- @Config.DefaultInt(300)
- @Config.RequiresMcRestart
- public int pollutionLargeGasTurbinePerSecond;
- @Config.Comment("Controls the pollution released per second by the multi smelter.")
- @Config.DefaultInt(400)
- @Config.RequiresMcRestart
- public int pollutionMultiSmelterPerSecond;
- @Config.Comment("Controls the pollution released per second by the pyrolyse oven.")
- @Config.DefaultInt(300)
- @Config.RequiresMcRestart
- public int pollutionPyrolyseOvenPerSecond;
- @Config.Comment("Controls the pollution released per second by the small coil boiler.")
- @Config.DefaultInt(20)
- @Config.RequiresMcRestart
- public int pollutionSmallCoalBoilerPerSecond;
- @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.")
- @Config.DefaultInt(20)
- @Config.RequiresMcRestart
- public int pollutionHighPressureLavaBoilerPerSecond;
- @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.")
- @Config.DefaultInt(30)
- @Config.RequiresMcRestart
- public int pollutionHighPressureCoalBoilerPerSecond;
-
- @Config.Comment("Controls the pollution released per second by the base diesel generator.")
- @Config.DefaultInt(40)
- @Config.RequiresMcRestart
- public int pollutionBaseDieselGeneratorPerSecond;
-
- // reading double as strings, not perfect, but better than nothing
- @Config.Comment({
- "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]",
- "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." })
- @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 })
- @Config.RequiresMcRestart
- public double[] pollutionDieselGeneratorReleasedByTier;
-
- @Config.Comment("Controls the pollution released per second by the base gas turbine.")
- @Config.DefaultInt(40)
- @Config.RequiresMcRestart
- public int pollutionBaseGasTurbinePerSecond;
-
- // reading double as strings, not perfect, but better than nothing
- @Config.Comment({
- "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]",
- "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." })
- @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 })
- @Config.RequiresMcRestart
- public double[] pollutionGasTurbineReleasedByTier;
- }
}
diff --git a/src/main/java/gregtech/common/misc/GTCommand.java b/src/main/java/gregtech/common/misc/GTCommand.java
index f1590ec792..e6fbe12144 100644
--- a/src/main/java/gregtech/common/misc/GTCommand.java
+++ b/src/main/java/gregtech/common/misc/GTCommand.java
@@ -25,8 +25,8 @@ import gregtech.api.enums.GTValues;
import gregtech.api.objects.GTChunkManager;
import gregtech.api.util.GTMusicSystem;
import gregtech.api.util.GTUtility;
-import gregtech.common.Pollution;
import gregtech.common.misc.spaceprojects.SpaceProjectManager;
+import gregtech.common.pollution.Pollution;
public final class GTCommand extends CommandBase {
diff --git a/src/main/java/gregtech/common/pollution/BlockMatcher.java b/src/main/java/gregtech/common/pollution/BlockMatcher.java
new file mode 100644
index 0000000000..a701d323bd
--- /dev/null
+++ b/src/main/java/gregtech/common/pollution/BlockMatcher.java
@@ -0,0 +1,96 @@
+package gregtech.common.pollution;
+
+import java.util.Map;
+import java.util.Set;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.multiplayer.WorldClient;
+import net.minecraftforge.event.world.WorldEvent;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
+import cpw.mods.fml.common.registry.GameData;
+import gregtech.GTMod;
+
+// Shamelessly Taken from BetterFoliage by octarine-noise
+public class BlockMatcher {
+
+ public Map<Class<?>, ColorOverrideType> whiteList = Maps.newHashMap();
+ public Set<Class<?>> blackList = Sets.newHashSet();
+ public Map<Integer, ColorOverrideType> blockIDs = Maps.newHashMap();
+
+ public ColorOverrideType matchesID(int blockId) {
+ return blockIDs.get(blockId);
+ }
+
+ public ColorOverrideType matchesID(Block block) {
+ return blockIDs.get(Block.blockRegistry.getIDForObject(block));
+ }
+
+ public void updateClassList(String[] cfg) {
+ whiteList.clear();
+ blackList.clear();
+ for (String line : cfg) {
+ GTMod.GT_FML_LOGGER.info("Checking for block:" + line);
+ String[] lines = line.split(":");
+ ColorOverrideType type = null;
+ if (lines.length > 1) {
+ try {
+ type = ColorOverrideType.fromName(lines[1].trim());
+ } catch (NumberFormatException e) {
+ GTMod.GT_FML_LOGGER.error(String.format("Invalid type [%s]", line));
+ continue;
+ }
+ }
+
+ if (lines[0].startsWith("-")) {
+ try {
+ blackList.add(Class.forName(lines[0].substring(1)));
+ GTMod.GT_FML_LOGGER.info("\t added blacklist:" + lines[0].substring(1));
+ } catch (ClassNotFoundException ignored) {}
+ } else {
+ if (type == null) {
+ GTMod.GT_FML_LOGGER.error(String.format("Invalid type [%s]", line));
+ continue;
+ }
+
+ try {
+ whiteList.put(Class.forName(lines[0]), type);
+ GTMod.GT_FML_LOGGER.info("\t added whitelist:" + lines[0]);
+ } catch (ClassNotFoundException ignored) {}
+ }
+ }
+ // updateBlockIDs();
+ }
+
+ private void updateBlockIDs() {
+ blockIDs.clear();
+ FMLControlledNamespacedRegistry<Block> blockRegistry = GameData.getBlockRegistry();
+ for (Block block : blockRegistry.typeSafeIterable()) {
+ ColorOverrideType t = matchesClass(block);
+ if (t != null) blockIDs.put(Block.blockRegistry.getIDForObject(block), t);
+ }
+ }
+
+ private ColorOverrideType matchesClass(Block block) {
+ for (Class<?> clazz : blackList) if (clazz.isAssignableFrom(block.getClass())) return null;
+ for (Class<?> clazz : whiteList.keySet())
+ if (clazz.isAssignableFrom(block.getClass())) return whiteList.get(clazz);
+ return null;
+ }
+
+ /**
+ * Caches block IDs on world load for fast lookup
+ *
+ * @param event
+ */
+ @SubscribeEvent
+ public void handleWorldLoad(WorldEvent.Load event) {
+ if (event.world instanceof WorldClient) {
+ updateBlockIDs();
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/pollution/ColorOverrideType.java b/src/main/java/gregtech/common/pollution/ColorOverrideType.java
new file mode 100644
index 0000000000..de0a44a835
--- /dev/null
+++ b/src/main/java/gregtech/common/pollution/ColorOverrideType.java
@@ -0,0 +1,28 @@
+package gregtech.common.pollution;
+
+public enum ColorOverrideType {
+
+ FLOWER,
+ GRASS,
+ LEAVES,
+ LIQUID;
+
+ public static ColorOverrideType fromName(String name) {
+ return switch (name) {
+ case "FLOWER" -> FLOWER;
+ case "GRASS" -> GRASS;
+ case "LEAVES" -> LEAVES;
+ case "LIQUID" -> LIQUID;
+ default -> throw new RuntimeException();
+ };
+ }
+
+ public int getColor(int oColor, int x, int z) {
+ return switch (this) {
+ case FLOWER -> PollutionRenderer.colorFoliage(oColor, x, z);
+ case GRASS -> PollutionRenderer.colorGrass(oColor, x, z);
+ case LEAVES -> PollutionRenderer.colorLeaves(oColor, x, z);
+ case LIQUID -> PollutionRenderer.colorLiquid(oColor, x, z);
+ };
+ }
+}
diff --git a/src/main/java/gregtech/common/entities/EntityFXPollution.java b/src/main/java/gregtech/common/pollution/EntityFXPollution.java
index facd3d3364..f1a1f18447 100644
--- a/src/main/java/gregtech/common/entities/EntityFXPollution.java
+++ b/src/main/java/gregtech/common/pollution/EntityFXPollution.java
@@ -1,4 +1,4 @@
-package gregtech.common.entities;
+package gregtech.common.pollution;
import java.util.Random;
diff --git a/src/main/java/gregtech/common/misc/GTClientPollutionMap.java b/src/main/java/gregtech/common/pollution/GTClientPollutionMap.java
index 546f8e8d12..0fd1da309b 100644
--- a/src/main/java/gregtech/common/misc/GTClientPollutionMap.java
+++ b/src/main/java/gregtech/common/pollution/GTClientPollutionMap.java
@@ -1,4 +1,4 @@
-package gregtech.common.misc;
+package gregtech.common.pollution;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
diff --git a/src/main/java/gregtech/common/Pollution.java b/src/main/java/gregtech/common/pollution/Pollution.java
index 4245a0ef12..10b8ffcfa7 100644
--- a/src/main/java/gregtech/common/Pollution.java
+++ b/src/main/java/gregtech/common/pollution/Pollution.java
@@ -1,4 +1,4 @@
-package gregtech.common;
+package gregtech.common.pollution;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
import static gregtech.common.GTProxy.dimensionWisePollution;
@@ -45,7 +45,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.net.GTPacketPollution;
import gregtech.api.util.GTChunkAssociatedData;
import gregtech.api.util.GTUtility;
-import gregtech.common.render.PollutionRenderer;
public class Pollution {
@@ -101,6 +100,33 @@ public class Pollution {
pollutionInstance.tickPollutionInWorld((int) (aEvent.world.getTotalWorldTime() % cycleLen));
}
+ public static BlockMatcher standardBlocks;
+ public static BlockMatcher liquidBlocks;
+ public static BlockMatcher doublePlants;
+ public static BlockMatcher crossedSquares;
+ public static BlockMatcher blockVine;
+
+ public static void onPostInitClient() {
+ if (PollutionConfig.pollution) {
+ standardBlocks = new BlockMatcher();
+ liquidBlocks = new BlockMatcher();
+ doublePlants = new BlockMatcher();
+ crossedSquares = new BlockMatcher();
+ blockVine = new BlockMatcher();
+ standardBlocks.updateClassList(PollutionConfig.renderStandardBlock);
+ liquidBlocks.updateClassList(PollutionConfig.renderBlockLiquid);
+ doublePlants.updateClassList(PollutionConfig.renderBlockDoublePlant);
+ crossedSquares.updateClassList(PollutionConfig.renderCrossedSquares);
+ blockVine.updateClassList(PollutionConfig.renderblockVine);
+ MinecraftForge.EVENT_BUS.register(standardBlocks);
+ MinecraftForge.EVENT_BUS.register(liquidBlocks);
+ MinecraftForge.EVENT_BUS.register(doublePlants);
+ MinecraftForge.EVENT_BUS.register(crossedSquares);
+ MinecraftForge.EVENT_BUS.register(blockVine);
+ MinecraftForge.EVENT_BUS.register(new PollutionTooltip());
+ }
+ }
+
private void tickPollutionInWorld(int aTickID) { // called from method above
// gen data set
if (aTickID == 0 || blank) {
@@ -406,7 +432,7 @@ public class Pollution {
addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX, aPos.chunkPosZ), aPollution);
}
- static void migrate(ChunkDataEvent.Load e) {
+ public static void migrate(ChunkDataEvent.Load e) {
addPollution(
e.getChunk(),
e.getData()
diff --git a/src/main/java/gregtech/common/pollution/PollutionConfig.java b/src/main/java/gregtech/common/pollution/PollutionConfig.java
new file mode 100644
index 0000000000..90098791c4
--- /dev/null
+++ b/src/main/java/gregtech/common/pollution/PollutionConfig.java
@@ -0,0 +1,397 @@
+package gregtech.common.pollution;
+
+import com.gtnewhorizon.gtnhlib.config.Config;
+
+import gregtech.api.enums.Mods;
+
+// needs to be loaded early from the coremod because
+// it decides to load some mixins or not
+@Config(modid = Mods.Names.GREG_TECH, category = "Pollution", configSubDirectory = "GregTech", filename = "Pollution")
+public class PollutionConfig {
+
+ // override name to be at the top of the cfg file
+ @Config.Name("Activate Pollution")
+ @Config.Comment("if true, enables pollution in the game.")
+ @Config.DefaultBoolean(true)
+ @Config.RequiresMcRestart
+ public static boolean pollution;
+
+ @Config.Comment("Controls the threshold starting from which you can see fog.")
+ @Config.DefaultInt(550_000)
+ @Config.RequiresMcRestart
+ public static int pollutionSmogLimit;
+ @Config.Comment("Controls the threshold starting from which players get poison effect.")
+ @Config.DefaultInt(750_000)
+ @Config.RequiresMcRestart
+ public static int pollutionPoisonLimit;
+ @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.")
+ @Config.DefaultInt(1_000_000)
+ @Config.RequiresMcRestart
+ public static int pollutionVegetationLimit;
+ @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.")
+ @Config.DefaultInt(2_000_000)
+ @Config.RequiresMcRestart
+ public static int pollutionSourRainLimit;
+ @Config.Comment("Controls the pollution released by an explosion.")
+ @Config.DefaultInt(100_000)
+ @Config.RequiresMcRestart
+ public static int pollutionOnExplosion;
+ @Config.Comment("Controls the pollution released per second by the bricked blast furnace.")
+ @Config.DefaultInt(200)
+ @Config.RequiresMcRestart
+ public static int pollutionPrimitveBlastFurnacePerSecond;
+ @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.")
+ @Config.DefaultInt(100)
+ @Config.RequiresMcRestart
+ public static int pollutionCharcoalPitPerSecond;
+ @Config.Comment("Controls the pollution released per second by the EBF.")
+ @Config.DefaultInt(400)
+ @Config.RequiresMcRestart
+ public static int pollutionEBFPerSecond;
+ @Config.Comment("Controls the pollution released per second by the large combustion engine.")
+ @Config.DefaultInt(480)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeCombustionEnginePerSecond;
+ @Config.Comment("Controls the pollution released per second by the extreme combustion engine.")
+ @Config.DefaultInt(3_840)
+ @Config.RequiresMcRestart
+ public static int pollutionExtremeCombustionEnginePerSecond;
+ @Config.Comment("Controls the pollution released per second by the implosion compressor.")
+ @Config.DefaultInt(10_000)
+ @Config.RequiresMcRestart
+ public static int pollutionImplosionCompressorPerSecond;
+ @Config.Comment("Controls the pollution released per second by the large bronze boiler.")
+ @Config.DefaultInt(1_000)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeBronzeBoilerPerSecond;
+ @Config.Comment("Controls the pollution released per second by the large steel boiler.")
+ @Config.DefaultInt(2_000)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeSteelBoilerPerSecond;
+ @Config.Comment("Controls the pollution released per second by the large titanium boiler.")
+ @Config.DefaultInt(3_000)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeTitaniumBoilerPerSecond;
+ @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.")
+ @Config.DefaultInt(4_000)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeTungstenSteelBoilerPerSecond;
+ @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.")
+ @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs.
+ @Config.RequiresMcRestart
+ public static float pollutionReleasedByThrottle;
+ @Config.Comment("Controls the pollution released per second by the large gas turbine.")
+ @Config.DefaultInt(300)
+ @Config.RequiresMcRestart
+ public static int pollutionLargeGasTurbinePerSecond;
+ @Config.Comment("Controls the pollution released per second by the multi smelter.")
+ @Config.DefaultInt(400)
+ @Config.RequiresMcRestart
+ public static int pollutionMultiSmelterPerSecond;
+ @Config.Comment("Controls the pollution released per second by the pyrolyse oven.")
+ @Config.DefaultInt(300)
+ @Config.RequiresMcRestart
+ public static int pollutionPyrolyseOvenPerSecond;
+ @Config.Comment("Controls the pollution released per second by the small coil boiler.")
+ @Config.DefaultInt(20)
+ @Config.RequiresMcRestart
+ public static int pollutionSmallCoalBoilerPerSecond;
+ @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.")
+ @Config.DefaultInt(20)
+ @Config.RequiresMcRestart
+ public static int pollutionHighPressureLavaBoilerPerSecond;
+ @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.")
+ @Config.DefaultInt(30)
+ @Config.RequiresMcRestart
+ public static int pollutionHighPressureCoalBoilerPerSecond;
+
+ @Config.Comment("Controls the pollution released per second by the base diesel generator.")
+ @Config.DefaultInt(40)
+ @Config.RequiresMcRestart
+ public static int pollutionBaseDieselGeneratorPerSecond;
+
+ // reading double as strings, not perfect, but better than nothing
+ @Config.Comment({
+ "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]",
+ "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." })
+ @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 })
+ @Config.RequiresMcRestart
+ public static double[] pollutionDieselGeneratorReleasedByTier;
+
+ @Config.Comment("Controls the pollution released per second by the base gas turbine.")
+ @Config.DefaultInt(40)
+ @Config.RequiresMcRestart
+ public static int pollutionBaseGasTurbinePerSecond;
+
+ // reading double as strings, not perfect, but better than nothing
+ @Config.Comment({
+ "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]",
+ "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." })
+ @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 })
+ @Config.RequiresMcRestart
+ public static double[] pollutionGasTurbineReleasedByTier;
+
+ // Minecraft
+ @Config.Comment("Explosion pollution")
+ @Config.DefaultFloat(333.34f)
+ public static float explosionPollutionAmount;
+
+ @Config.Comment("Make furnaces Pollute")
+ @Config.DefaultBoolean(true)
+ @Config.RequiresMcRestart
+ public static boolean furnacesPollute;
+
+ @Config.Comment("Furnace pollution per second, min 1!")
+ @Config.DefaultInt(20)
+ public static int furnacePollutionAmount;
+
+ // Galacticraft
+
+ @Config.Comment("Pollution Amount for Rockets")
+ @Config.DefaultInt(10000)
+ public static int rocketPollutionAmount;
+
+ @Config.Comment("Make rockets Pollute")
+ @Config.DefaultBoolean(true)
+ @Config.RequiresMcRestart
+ public static boolean rocketsPollute;
+
+ // Railcraft
+
+ @Config.Comment("Pollution Amount for Advanced Coke Ovens")
+ @Config.DefaultInt(80)
+ public static int advancedCokeOvenPollutionAmount;
+
+ @Config.Comment("Pollution Amount for Coke Ovens")
+ @Config.DefaultInt(10)
+ public static int cokeOvenPollutionAmount;
+
+ @Config.Comment("Pollution Amount for RC Firebox")
+ @Config.DefaultInt(20)
+ public static int fireboxPollutionAmount;
+
+ @Config.Comment("Pollution Amount for hobbyist steam engine")
+ @Config.DefaultInt(20)
+ public static int hobbyistEnginePollutionAmount;
+
+ @Config.Comment("Make Railcraft Pollute")
+ @Config.DefaultBoolean(true)
+ @Config.RequiresMcRestart
+ public static boolean railcraftPollutes;
+
+ @Config.Comment("Pollution Amount for tunnel bore")
+ @Config.DefaultInt(2)
+ public static int tunnelBorePollutionAmount;
+
+ // bartworks
+ @Config.Comment("How much should the Simple Stirling Water Pump produce pollution per second")
+ @Config.DefaultInt(5)
+ public static int pollutionHeatedWaterPumpSecond;
+
+ @Config.Comment("How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel")
+ @Config.DefaultInt(400)
+ public static int basePollutionMBFSecond;
+
+ @Config.Comment("Changes colors of certain blocks based on pollution levels")
+ @Config.DefaultBoolean(true)
+ @Config.RequiresMcRestart
+ public static boolean pollutionBlockRecolor;
+
+ @Config.Comment("Double Plant Blocks - Recolor Block List")
+ @Config.DefaultStringList({ "net.minecraft.block.BlockDoublePlant:FLOWER", })
+ @Config.RequiresMcRestart
+ public static String[] renderBlockDoublePlant;
+
+ @Config.Comment("Liquid Blocks - Recolor Block List")
+ @Config.DefaultStringList({ "net.minecraft.block.BlockLiquid:LIQUID" })
+ @Config.RequiresMcRestart
+ public static String[] renderBlockLiquid;
+
+ @Config.Comment("Block Vine - Recolor Block List")
+ @Config.DefaultStringList({ "net.minecraft.block.BlockVine:FLOWER", })
+ @Config.RequiresMcRestart
+ public static String[] renderblockVine;
+
+ @Config.Comment("Crossed Squares - Recolor Block List")
+ @Config.DefaultStringList({ "net.minecraft.block.BlockTallGrass:FLOWER", "net.minecraft.block.BlockFlower:FLOWER",
+ "biomesoplenty.common.blocks.BlockBOPFlower:FLOWER", "biomesoplenty.common.blocks.BlockBOPFlower2:FLOWER",
+ "biomesoplenty.common.blocks.BlockBOPFoliage:FLOWER", })
+ @Config.RequiresMcRestart
+ public static String[] renderCrossedSquares;
+
+ @Config.Comment("Standard Blocks - Recolor Block List")
+ @Config.DefaultStringList({ "net.minecraft.block.BlockGrass:GRASS", "net.minecraft.block.BlockLeavesBase:LEAVES",
+ "biomesoplenty.common.blocks.BlockOriginGrass:GRASS", "biomesoplenty.common.blocks.BlockLongGrass:GRASS",
+ "biomesoplenty.common.blocks.BlockNewGrass:GRASS", "tconstruct.blocks.slime.SlimeGrass:GRASS",
+ "thaumcraft.common.blocks.BlockMagicalLeaves:LEAVES", })
+ @Config.RequiresMcRestart
+ public static String[] renderStandardBlock;
+
+ // gt++
+ @Config.Comment("pollution rate in gibbl/s for the Amazon warehousing depot")
+ @Config.DefaultInt(40)
+ public static int pollutionPerSecondMultiPackager;
+ @Config.Comment("pollution rate in gibbl/s for the Alloy blast smelter")
+ @Config.DefaultInt(300)
+ public static int pollutionPerSecondMultiIndustrialAlloySmelter;
+ @Config.Comment("pollution rate in gibbl/s for the High current arc furnace")
+ @Config.DefaultInt(2_400)
+ public static int pollutionPerSecondMultiIndustrialArcFurnace;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial centrifuge")
+ @Config.DefaultInt(300)
+ public static int pollutionPerSecondMultiIndustrialCentrifuge;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial coke oven")
+ @Config.DefaultInt(80)
+ public static int pollutionPerSecondMultiIndustrialCokeOven;
+ @Config.Comment("pollution rate in gibbl/s for the Cutting factory")
+ @Config.DefaultInt(160)
+ public static int pollutionPerSecondMultiIndustrialCuttingMachine;
+ @Config.Comment("pollution rate in gibbl/s for the Utupu-Tanuri")
+ @Config.DefaultInt(500)
+ public static int pollutionPerSecondMultiIndustrialDehydrator;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial electrolyzer")
+ @Config.DefaultInt(300)
+ public static int pollutionPerSecondMultiIndustrialElectrolyzer;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial extrusion machine")
+ @Config.DefaultInt(1_000)
+ public static int pollutionPerSecondMultiIndustrialExtruder;
+ @Config.Comment("pollution rate in gibbl/s for the Maceration stack")
+ @Config.DefaultInt(400)
+ public static int pollutionPerSecondMultiIndustrialMacerator;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial mixing machine")
+ @Config.DefaultInt(800)
+ public static int pollutionPerSecondMultiIndustrialMixer;
+ @Config.Comment("pollution rate in gibbl/s for the Large processing factory in metal mode")
+ @Config.DefaultInt(400)
+ public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal;
+ @Config.Comment("pollution rate in gibbl/s for the Large processing factory in fluid mode")
+ @Config.DefaultInt(400)
+ public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid;
+ @Config.Comment("pollution rate in gibbl/s for the Large processing factory in misc mode")
+ @Config.DefaultInt(600)
+ public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial material press in forming mode")
+ @Config.DefaultInt(240)
+ public static int pollutionPerSecondMultiIndustrialPlatePress_ModeForming;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial material press in bending mode")
+ @Config.DefaultInt(480)
+ public static int pollutionPerSecondMultiIndustrialPlatePress_ModeBending;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial Forge Hammer")
+ @Config.DefaultInt(250)
+ public static int pollutionPerSecondMultiIndustrialForgeHammer;
+ @Config.Comment("pollution rate in gibbl/s for the Large Sifter")
+ @Config.DefaultInt(40)
+ public static int pollutionPerSecondMultiIndustrialSifter;
+ @Config.Comment("pollution rate in gibbl/s for the Large thermal refinery")
+ @Config.DefaultInt(1_000)
+ public static int pollutionPerSecondMultiIndustrialThermalCentrifuge;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial fluid heater")
+ @Config.DefaultInt(1_000)
+ public static int pollutionPerSecondMultiIndustrialFluidHeater;
+ @Config.Comment("pollution rate in gibbl/s for the Cryogenic freezer")
+ @Config.DefaultInt(500)
+ public static int pollutionPerSecondMultiIndustrialVacuumFreezer;
+ @Config.Comment("pollution rate in gibbl/s for the Ore washing plant in chemical bath mode")
+ @Config.DefaultInt(400)
+ public static int pollutionPerSecondMultiIndustrialWashPlant_ModeChemBath;
+ @Config.Comment("pollution rate in gibbl/s for the Ore washing plant in ore washer mode")
+ @Config.DefaultInt(100)
+ public static int pollutionPerSecondMultiIndustrialWashPlant_ModeWasher;
+ @Config.Comment("pollution rate in gibbl/s for the Wire factory")
+ @Config.DefaultInt(100)
+ public static int pollutionPerSecondMultiIndustrialWireMill;
+ @Config.Comment("pollution rate in gibbl/s for the IsaMill grinding machine")
+ @Config.DefaultInt(1_280)
+ public static int pollutionPerSecondMultiIsaMill;
+ @Config.Comment("pollution rate in gibbl/s for the Dangote distillus in distillery mode")
+ @Config.DefaultInt(240)
+ public static int pollutionPerSecondMultiAdvDistillationTower_ModeDistillery;
+ @Config.Comment("pollution rate in gibbl/s for the Dangote distillus in distillation tower mode")
+ @Config.DefaultInt(480)
+ public static int pollutionPerSecondMultiAdvDistillationTower_ModeDT;
+ @Config.Comment("pollution rate in gibbl/s for the Volcanus")
+ @Config.DefaultInt(500)
+ public static int pollutionPerSecondMultiAdvEBF;
+ @Config.Comment("pollution rate in gibbl/s for the Density^2")
+ @Config.DefaultInt(5_000)
+ public static int pollutionPerSecondMultiAdvImplosion;
+ @Config.Comment("pollution rate in gibbl/s for the Alloy blast furnace")
+ @Config.DefaultInt(200)
+ public static int pollutionPerSecondMultiABS;
+ @Config.Comment("pollution rate in gibbl/s for the Cyclotron")
+ @Config.DefaultInt(200)
+ public static int pollutionPerSecondMultiCyclotron;
+ @Config.Comment("pollution rate in gibbl/s for the Zuhai - fishing port")
+ @Config.DefaultInt(20)
+ public static int pollutionPerSecondMultiIndustrialFishingPond;
+ // pollutionPerSecondMultiLargeRocketEngine;
+ @Config.Comment("pollution rate in gibbl/s for the Large semifluid burner")
+ @Config.DefaultInt(1_280)
+ public static int pollutionPerSecondMultiLargeSemiFluidGenerator;
+ @Config.Comment("pollution rate in gibbl/s for the Matter fabrication CPU")
+ @Config.DefaultInt(40)
+ public static int pollutionPerSecondMultiMassFabricator;
+ @Config.Comment("pollution rate in gibbl/s for the Reactor fuel processing plant")
+ @Config.DefaultInt(4_000)
+ public static int pollutionPerSecondMultiRefinery;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial Rock Breaker")
+ @Config.DefaultInt(100)
+ public static int pollutionPerSecondMultiIndustrialRockBreaker;
+ @Config.Comment("pollution rate in gibbl/s for the Industrial Chisel")
+ @Config.DefaultInt(50)
+ public static int pollutionPerSecondMultiIndustrialChisel;
+ @Config.Comment("pollution rate in gibbl/s for the Tree growth simulator")
+ @Config.DefaultInt(100)
+ public static int pollutionPerSecondMultiTreeFarm;
+ @Config.Comment("pollution rate in gibbl/s for the Flotation cell regulator")
+ @Config.DefaultInt(0)
+ public static int pollutionPerSecondMultiFrothFlotationCell;
+ @Config.Comment("pollution rate in gibbl/s for the Large-Scale auto assembler v1.01")
+ @Config.DefaultInt(500)
+ public static int pollutionPerSecondMultiAutoCrafter;
+ @Config.Comment("pollution rate in gibbl/s for the Nuclear salt processing plant")
+ @Config.DefaultInt(500)
+ public static int pollutionPerSecondNuclearSaltProcessingPlant;
+ @Config.Comment("pollution rate in gibbl/s for the Multiblock Molecular Transformer")
+ @Config.DefaultInt(1_000)
+ public static int pollutionPerSecondMultiMolecularTransformer;
+
+ @Config.Comment("pollution rate in gibbl/s for the Elemental Duplicator")
+ @Config.DefaultInt(1_000)
+ public static int pollutionPerSecondElementalDuplicator;
+
+ @Config.Comment("pollution rate in gibbl/s for the Thermal boiler")
+ @Config.DefaultInt(700)
+ public static int pollutionPerSecondMultiThermalBoiler;
+ @Config.Comment("pollution rate in gibbl/s for the Algae farm")
+ @Config.DefaultInt(0)
+ public static int pollutionPerSecondMultiAlgaePond;
+ @Config.Comment("base pollution rate in gibbl/s for the single block semi fluid generators")
+ @Config.DefaultInt(40)
+ public static int basePollutionPerSecondSemiFluidGenerator;
+ @Config.Comment("coefficient applied to the base rate of the single block semi fluid generators based on its tier (first is tier 0 aka ULV)")
+ @Config.DefaultDoubleList({ 0.0, 2.0, 4.0, 8.0, 12.0, 16.0 })
+ public static double[] pollutionReleasedByTierSemiFluidGenerator;
+ @Config.Comment("base pollution rate in gibbl/s for the single block boilers")
+ @Config.DefaultInt(35)
+ public static int basePollutionPerSecondBoiler;
+ @Config.Comment("coefficient applied to the base rate of the single block boilers based on its tier (first is tier 0 aka ULV)")
+ @Config.DefaultDoubleList({ 0.0, 1.0, 1.43, 1.86 })
+ public static double[] pollutionReleasedByTierBoiler;
+ @Config.Comment("minimum base pollution rate in gibbl/s for the single block rocket engines")
+ @Config.DefaultInt(250)
+ public static int baseMinPollutionPerSecondRocketFuelGenerator;
+ @Config.Comment("maximum base pollution rate in gibbl/s for the single block rocket engines")
+ @Config.DefaultInt(2_000)
+ public static int baseMaxPollutionPerSecondRocketFuelGenerator;
+ @Config.Comment("coefficient applied to the base rate of the single block rocket engines based on its tier (first is tier 0 aka ULV)")
+ @Config.DefaultDoubleList({ 0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 3.0 })
+ public static double[] pollutionReleasedByTierRocketFuelGenerator;
+ @Config.Comment("base pollution rate in gibbl/s for the geothermal engines")
+ @Config.DefaultInt(100)
+ public static int basePollutionPerSecondGeothermalGenerator;
+ @Config.Comment("coefficient applied to the base rate of the single block geothermal engines based on its tier (first is tier 0 aka ULV)")
+ @Config.DefaultDoubleList({ 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 })
+ public static double[] pollutionReleasedByTierGeothermalGenerator;
+
+}
diff --git a/src/main/java/gregtech/common/render/PollutionRenderer.java b/src/main/java/gregtech/common/pollution/PollutionRenderer.java
index 3b97fc820f..d0b76a58b1 100644
--- a/src/main/java/gregtech/common/render/PollutionRenderer.java
+++ b/src/main/java/gregtech/common/pollution/PollutionRenderer.java
@@ -1,4 +1,4 @@
-package gregtech.common.render;
+package gregtech.common.pollution;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -22,8 +22,6 @@ import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.GTMod;
-import gregtech.common.entities.EntityFXPollution;
-import gregtech.common.misc.GTClientPollutionMap;
@SideOnly(Side.CLIENT)
public class PollutionRenderer {
diff --git a/src/main/java/gregtech/common/pollution/PollutionTooltip.java b/src/main/java/gregtech/common/pollution/PollutionTooltip.java
new file mode 100644
index 0000000000..0fa338a624
--- /dev/null
+++ b/src/main/java/gregtech/common/pollution/PollutionTooltip.java
@@ -0,0 +1,108 @@
+package gregtech.common.pollution;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.event.entity.player.ItemTooltipEvent;
+
+import cpw.mods.fml.common.eventhandler.EventPriority;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gregtech.api.enums.Mods;
+import gregtech.api.util.GTModHandler;
+import gregtech.api.util.GTUtility;
+
+public class PollutionTooltip {
+
+ private static final String PRODUCES_POLLUTION_FORMAT = "Produces %d Pollution/Second";
+ private static final String MULTI_POLLUTION_FORMAT = "A complete Multiblock produces %d Pollution/Second";
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void getTooltip(ItemTooltipEvent event) {
+ if (event.itemStack == null) return;
+
+ if (PollutionConfig.furnacesPollute) {
+ String furnacePollution = String.format(PRODUCES_POLLUTION_FORMAT, PollutionConfig.furnacePollutionAmount);
+
+ // Furnace and Iron Furnace
+ if (GTUtility.areStacksEqual(event.itemStack, new ItemStack(Blocks.furnace))
+ || GTUtility.areStacksEqual(event.itemStack, GTModHandler.getModItem("IC2", "blockMachine", 1, 1))) {
+ event.toolTip.add(furnacePollution);
+ }
+
+ // Alchemical Furnace
+ if (Mods.Thaumcraft.isModLoaded()) {
+ if (GTUtility
+ .areStacksEqual(event.itemStack, GTModHandler.getModItem("Thaumcraft", "blockStoneDevice", 1, 0))) {
+ event.toolTip.add(furnacePollution);
+ }
+ }
+
+ // Advanced Alchemical Furnace
+ if (Mods.ThaumicBases.isModLoaded()) {
+ if (GTUtility
+ .areStacksEqual(event.itemStack, GTModHandler.getModItem("thaumicbases", "advAlchFurnace", 1, 0))) {
+ event.toolTip.add(furnacePollution);
+ }
+ }
+ }
+
+ if (Mods.Railcraft.isModLoaded() && PollutionConfig.railcraftPollutes) {
+
+ // Solid and Liquid Boiler Firebox
+ if (GTUtility.areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "machine.beta", 1, 5))
+ || GTUtility
+ .areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "machine.beta", 1, 6))) {
+ event.toolTip.add(
+ String.format("Produces %d Pollution/Second per firebox", PollutionConfig.fireboxPollutionAmount));
+ }
+
+ // Tunnel Bore
+ if (GTUtility.areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "cart.bore", 1, 0))) {
+ event.toolTip.add(String.format(PRODUCES_POLLUTION_FORMAT, PollutionConfig.tunnelBorePollutionAmount));
+ }
+
+ // Coke Oven Brick
+ if (GTUtility
+ .areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "machine.alpha", 1, 7))) {
+ event.toolTip.add(String.format(MULTI_POLLUTION_FORMAT, PollutionConfig.cokeOvenPollutionAmount));
+ }
+
+ // Advanced Coke Oven Brick
+ if (GTUtility
+ .areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "machine.alpha", 1, 12))) {
+ event.toolTip
+ .add(String.format(MULTI_POLLUTION_FORMAT, PollutionConfig.advancedCokeOvenPollutionAmount));
+ }
+
+ // Hobbyist's Steam Engine
+ if (GTUtility.areStacksEqual(event.itemStack, GTModHandler.getModItem("Railcraft", "machine.beta", 1, 7))) {
+ event.toolTip
+ .add(String.format(PRODUCES_POLLUTION_FORMAT, PollutionConfig.hobbyistEnginePollutionAmount));
+ }
+ }
+
+ // Galacticraft (and Galaxy Space) rockets
+ if (Mods.GalacticraftCore.isModLoaded() && PollutionConfig.rocketsPollute
+ && event.itemStack.getItem() != null) {
+ String simpleName = event.itemStack.getItem()
+ .getClass()
+ .getSimpleName();
+ // TODO I'm sure there is a better way to check the tier of a rocket....
+ if (simpleName.contains("Rocket")) {
+ for (char d : simpleName.toCharArray()) {
+ if (Character.isDigit(d)) {
+ int tier = Character.getNumericValue(d);
+ event.toolTip.add(
+ String.format(
+ "Produces %d Pollution/Second when ignited",
+ (PollutionConfig.rocketPollutionAmount * tier / 100)));
+ event.toolTip.add(
+ String.format(
+ "Produces %d Pollution/Second when flying",
+ PollutionConfig.rocketPollutionAmount * tier));
+ break;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/MTEBoiler.java b/src/main/java/gregtech/common/tileentities/boilers/MTEBoiler.java
index b49da44e97..a84cb8ac91 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/MTEBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/MTEBoiler.java
@@ -41,7 +41,7 @@ import gregtech.api.util.GTLog;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTUtility;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
-import gregtech.common.Pollution;
+import gregtech.common.pollution.Pollution;
public abstract class MTEBoiler extends MTEBasicTank implements IGetTitleColor, IAddUIWidgets {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerBronze.java b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerBronze.java
index e951656d23..632ff0ac1f 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerBronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerBronze.java
@@ -36,7 +36,7 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
-import gregtech.common.Pollution;
+import gregtech.common.pollution.Pollution;
public class MTEBoilerBronze extends MTEBoiler {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTECharcoalPit.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTECharcoalPit.java
index bfa672577d..f39ea70422 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/MTECharcoalPit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTECharcoalPit.java
@@ -35,7 +35,7 @@ import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.WorldSpawnedEventBuilder;
-import gregtech.common.Pollution;
+import gregtech.common.pollution.Pollution;
public class MTECharcoalPit extends MTETooltipMultiBlockBase implements ISecondaryDescribable {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPrimitiveBlastFurnace.java
index 0011a0efad..9c92733322 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPrimitiveBlastFurnace.java
@@ -49,7 +49,7 @@ import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTUtility;
import gregtech.api.util.WorldSpawnedEventBuilder;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
-import gregtech.common.Pollution;
+import gregtech.common.pollution.Pollution;
public abstract class MTEPrimitiveBlastFurnace extends MetaTileEntity
implements IAlignment, ISurvivalConstructable, RecipeMapWorkable, IAddUIWidgets, IGetTitleColor {