Pollution

Many machines in GregTech generate pollution while running. If left unchecked, pollution can cause various negative effects, such as affecting players with debuffs, destroying plant life, or even damaging blocks. Fortunately, pollution dissipates over time, and there are several machines that can clean up pollution at a much faster rate.

Basics
Pollution is a chunk-based effect. Every Minecraft chunk has an associated pollution amount, measured in units called gibbl. This means that every block in the same chunk is affected by pollution equally. It also does not matter where in the chunk pollution-generating machines are. In particular, there is no difference between having your machines out in an open field, or hidden in a closed-off cave. They will all contribute to the pollution in their chunk in the same way. Pollution is not affected by terrain, walls, or other solid blocks in any way.

If pollution in a chunk becomes too high, it will slowly spread to the four adjacent chunks. Pollution also slowly dissipates over time by on its own. Players can reduce the amount of pollution that a machine generates by installing a higher tier muffler hatch, and remove pollution from the environment by using a Pollution Scrubber or a multiblock Air Filter.

Pollution works the same way in every dimension, including the Nether, space, and personal dimensions. There is no way for pollution to spread from one dimension to another.

Contrary to popular belief, pollution does not affect the growth of IC2 crops, or any other plants. However, severe pollution can turn the farmland the crops are planted on into sand, which breaks the crop. Crops planted on blocks other than vanilla farmland are safe. The Extreme Industrial Greenhouse is also safe from pollution, as it uses dirt from Random Things, not vanilla.

The maximum amount of pollution in a chunk is 2,147,483,647 gibbl. (The largest number representable by a 32 bit signed integer type in Java.) Any pollution generated over this limit is simply ignored.

Machines
The most common sources of pollution are running machines. Machines which cause pollution usually display the generated amount in their tooltip (see picture).

Note, however, that some machines do not list the amount this way; and for some machines the amount of pollution generated is not a fixed value, but it depends on the settings or process that is currently being run. As a rule of thumb, if a multiblock structure includes a muffler hatch, it will cause some pollution. Even some single-block machines can create pollution, notably most generators and some furnaces.

A machine does not output pollution into the world continuously every game tick. Instead, pollution accumulates in an internal buffer while the machine runs, at the rate listed in the tooltip. Pollution accumulates in this buffer every tick (by 1/20th of the listed amount), so even if the machine runs for less than a full second it still produces pollution. When the internal buffer reaches 10,000 gibbl, this amount of pollution is vented to the chunk the machine is in. If the machine is a multiblock equipped with a muffler hatch, the muffler can then reduce the amount of pollution that is released into the air.


 * Example: An Electric Blast Furnace (EBF) produces 400 gibbl per second. This means that after 25 seconds the internal buffer accumulates 10,000 gibbl and is vented. If the EBF is equipped with an HV muffler hatch, this amount is reduced to 75%, and 7,500 gibbl of pollution is added to the chunk. However, the internal buffer is still reduced by 10,000 gibbl, to zero; the extra 2,500 gibbl simply vanishes! So during continuous operation, the EBF will release 7,500 gibbl into its chunk every 25 seconds.

If you just want to calculate the average rate at which a machine generates pollution, simply multiply the rate listed on the tooltip by the reduction of the muffler hatch. In the example above, the EBF with an HV muffler generates  gibbl/sec. You can check that this simple calculation agrees with the detailed explanation above.


 * Could you automatically break and replace the multiblock controller to reset the pollution buffer before it is released to completely negate pollution? If you figure something out let me know!

Machines only generate pollution while running, idle or disabled machines do not generate pollution. Overclocking a machine to make it run faster does not cause it to generate more pollution than otherwise.

Other Sources
Rocket launches also cause a large amount of pollution. This used to be listed on the rocket's tooltip, now it's not, so for now you can refer to this table:

When a GT machine explodes (due to overvolting, fire, or otherwise), it creates 2,000,000 gibbl of pollution in the chunk it was in.

Measuring Pollution


Pollution can be measured by a Pollution Detection Device (PDD), which can be crafted in LV tier. Place the device down and right-click it, and it will write the amount of pollution in the current chunk in the in-game chat. The PDD does not need power.

The PDD can also emit a redstone signal when the amount of pollution exceeds some specified value. You can use this to automatically turn off your heavily polluting machinery, or to sound an alarm when pollution gets too bad. Right-click the front face of the PDD with a GT screwdriver to configure the threshold. Click the left half of the face (with a - sign) to lower the threshold, click the right half (with a + sign) to increase it. Click the top half of the face to modify the threshold by 5,000; click the bottom half to modify it by 50,000. You will see a message in chat when you do this correctly.

Finally, you can also connect the device to a Nuclear Control Information Panel using the GregTech Sensor Kit.

In MV tier you can craft the hand-held Portable Scanner, which can also list the amount of pollution in the current chunk in chat when right-clicked. This is much more convenient than carrying the PDD around, and the scanner has many other uses as well.

Pollution Effects
As the amount of pollution in a chunk increases, it will inflict more and more severe effects on players and the environment. All of the following effects stack, so a chunk with high levels of pollution will be able to cause all of them at the same time.

Pollution creates a visual fog effect, which gets more intense as the pollution levels increase. At extremely high levels of pollution (around 750,000 gibbl and up) this effect is also accompanied by falling ash particles.



Smog
If the pollution amount in a chunk exceeds 500,000 gibbl, all living entities in this chunk (including players) might get affected by the following debuffs: Weakness, Slowness, or Mining Fatigue. The level and duration of the debuffs scale with the amount of pollution:
 * , rounded down.
 * ticks, up to a maximum of 1,000 ticks (50 seconds).

The debuffs last for their full duration, even if the player leaves the polluted chunk. Normal methods of removing debuffs still work on these, such as drinking milk.

Players wearing a full set of armor which provides hazmat protection do not get afflicted by these debuffs.

Poison
If the pollution amount in a chunk exceeds 750,000 gibbl, all living entities in this chunk (including players) might get affected by the following debuffs: Hunger, Nausea, Poison, or Blindness. The level and duration of the debuffs scale with the amount of pollution:
 * Hunger:
 * Level is always 1.
 * ticks. This means that unless the pollution levels are extremely high, you will usually not notice the debuff. But it will still drain one point from your hunger bar.
 * Nausea and Blindness:
 * Level is always 2 for both effects.
 * ticks, up to a maximum of 1,000 ticks (50 seconds).
 * Poison:
 * , rounded down.
 * ticks, up to a maximum of 1,000 ticks (50 seconds).

As with Smog effects, these persist even if the player leaves the polluted area, can be removed by usual means, and do not get applied to players who wear a full set of armor with hazmat protection.

Vegetation Destruction
If the pollution amount in a chunk exceeds 1,000,000 gibbl, plant life in the chunk might get destroyed.

A number of random blocks equal to  is chosen from the chunk during each "pollution check" (see below). The selection process slightly prioritizes blocks near height, but any block can be chosen. The details are complicated and not important for this article.

Then for each of the chosen blocks:
 * Leaf blocks get deleted.
 * Vanilla Minecraft plants (Wheat, Carrots, Pumpkins, Sugar Canes, Vines, flowers, etc.) get broken and drop as an item.
 * Tall grass and saplings get turned into a Dead Bush. (This includes saplings placed on crop sticks as bonsais.)
 * Mossy Cobblestone gets turned into regular Cobblestone.
 * Grass (block) gets turned into Dirt.
 * Dirt and farmland get turned into Sand.



Sour Rain
If the pollution amount in a chunk exceeds 2,000,000 gibbl, and it is currently raining, the block destruction method from above can cause new effects on blocks that are exposed to the open sky:
 * Stone gets turned into Cobblestone.
 * Cobblestone gets turned into Gravel.
 * Gravel gets turned into Sand.

Natural Dissipation
The easiest and laziest way of dealing with pollution is to ignore the problem until it goes away.

Pollution in every chunk slowly dissipates on its own. The more pollution there is in a chunk, the faster it dissipates. This means that any running machine will eventually reach an equilibrium where the pollution can dissipate as fast as the machine can produce it. (Although this equilibrium might not be a healthy amount.)

If pollution in a chunk exceeds 400,000 gibbl, it can also spread to adjacent chunks. This is both good and bad: pollution will affect a larger area, but the spread moves some pollution away from the chunk where it was originally generated.


 * Details:


 * Pollution spread is calculated in "cycles". Every chunk undergoes one pollution cycle every 1,200 ticks (60 seconds). However, not all chunks in the world are processed at the same time, to prevent performance spikes. Therefore different chunks will get processed at different times during the cycle.


 * In each cycle, the following is performed for the chunk:


 * First, the pollution in the chunk is reduced by 0.0055 (0.55%) of its current value.


 * Next, if the pollution amount in the current chunk is more than 400,000 gibbl, then pollution can spread to the four directly adjacent chunks. However, pollution can only spread to a neighboring chunk if the amount of pollution in this neighbor is less than 5/6ths (0.83) of the pollution in the current chunk.


 * The amount of pollution transferred to a neighboring chunk is 1/20th of the difference between the pollution of the current chunk and the pollution of the neighbor. For example, if the current chunk contains 1,000,000 gibbl, and a neighboring chunk contains 400,000 gibbl, then 30,000 gibbl gets transferred from the current chunk to the neighbor.


 * Pollution tries to spread to all four neighbors of the chunk in each cycle, one by one. Therefore, in a perfect situation (if none of the neighbors have any pollution at all), the pollution in a single chunk can be naturally reduced by about 19% in one cycle.

Preventing Pollution
The second easiest way of dealing with pollution is to generate less of it.

A straightforward way of reducing the amount of pollution your machines produce is to upgrade their Muffler Hatches. A machine with an LV muffler will generate the amount of pollution per second that is shown on its tooltip. But higher tier mufflers reduce this amount: for example, an HV muffler only generates 75% of the listed pollution. This scales all the way to UHV, and a machine with an UHV muffler creates no pollution at all! Check the tooltip of a muffler hatch to see how much pollution it lets through.

Another option is using Advanced Muffler Hatches. While they are more difficult to craft, they reduce pollution by a much larger amount than the standard mufflers. For optimal efficiency, you need to insert an Air Filter [Tier 1] or Air Filter [Tier 2] into the muffler hatch. LV to EV mufflers can use both types of filters, but IV mufflers and higher require Tier 2 filters. Filters can be inserted into the hatch by automation; although remember that you need to keep the space in front of the muffler free, just like a regular muffler hatch.

The Advanced Mufflers will still run without a filter, they will just generate slightly more pollution. An advanced muffler hatch with a filter (of either tier) reduces the pollution output to  of the base amount (LV = tier 1), this is the amount shown on the tooltip. Without a filter the hatch reduces pollution output to  of base. Even without a filter these are much more efficient than the basic muffler hatches! See table below for a comparison.


 * Note: These hatches are supposed to consume one point of durability of the filter every time pollution is ejected from the machine (see Generating Pollution). However as of GTNH version 2.2.8 these are bugged and do not damage the filter at all. So one filter in every hatch will last you forever, if you feel like cheating.


 * [1] Requires a Tier 2 Air Filter.
 * [2] The UHV advanced muffler is called Advanced Muffler Hatch (MAX) in game.

You can also combat pollution by planning your infrastructure in a smart way. There are several possible approaches: Remember that pollution only spreads to the four directly adjacent chunks, so if you place your pollution producers diagonally from your living area, pollution needs to travel over more chunks to get to you.
 * You can try to spread out your big pollution producers over a larger area, so that no one chunk accumulates dangerous levels of pollution. Then you can rely on natural dissipation to keep pollution levels under control.
 * Alternatively, you can place all your polluting machines together in one place, several chunks away from your base. Concentrate all the pollution there and keep the rest of your base clean. Just remember to wear your hazmat suit when you need to go there to do maintenance!
 * Since pollution can not spread between dimensions, you can even put the worst polluting machines in the Nether, and let the pigmen deal with the effects instead of you. You will need to chunkload them if you want them to continue running while you are back home though.

Finally, make sure that machines that generate lots of pollution only run when they are needed. Turn off your generators when your energy storage gets full. Use the Pollution Detection Device to control passive production if it is polluting too much. Overclock your machines to a higher energy tier so that they complete their work faster, and generate less pollution in that time!

Removing Pollution
So you let your MEBFs run overnight, cheaped out on mufflers, or had a machine explosion or two, and now you can't see three feet in front of you because of the smog. What now? You could wait for the pollution to go away on its own, but that would mean stopping that MEBF and wasting precious production time. Fortunately, there are better and faster ways of removing pollution quickly: single block Pollution Scrubbers, and multiblock Electric Air Filters.

Pollution Scrubbers

 * (Note: These are actually really bad. You should probably be using the multiblocks instead. Keep reading here only if you want to know just how bad these are.)

The first pollution removal machine is the Pollution Scrubber. Much like many other single block machines they change name as they go higher in tiers (Pollution Scrubber -- Air Recycler -- Atmospheric Cleaner -- Biosphere Cleanser), they exist all the way up to UHV. The Pollution Scrubber requires three things to work:
 * Power. The machine takes 2A of the respective power tier to run.
 * Turbine. The same kind of turbine rotor you would use in your gas or plasma turbines. Only three stats of the turbine matter here: Efficiency, Optimal Steam flow, and Durability.
 * There are also three Basic Turbines (Iron, Bronze, and Steel) that work specifically only in the Pollution Scrubber. Their stats are pretty bad, only use them if you need the scrubber really early on and can't afford proper turbines yet.


 * Air Filter. Both the Tier 1 and the Tier 2 versions work, the only difference is their durability.

Both the turbine and the air filter will take damage while the scrubber is working, and both will eventually need to be replaced.

Additionally, the scrubber works faster if you expose more of its sides to open air. You probably can't manage 6 open sides since you have to run a power cable to it somehow, but you should aim to keep all five remaining sides open and facing an empty air block.

The math for how much pollution the scrubber removes is fairly complicated, I will explain it in detail below. If you just want to see for yourself, hover over the blue i icon in the top right of the scrubber's GUI while it is running. But be careful, the machine is lying to you. The actual amount of pollution it removes per second is half of the value you see. Also, if you scan the scrubber with a Portable Scanner, it tells you yet another value, which is also completely wrong. Half of the value that the GUI shows is the correct amount that the scrubber removes from its chunk every second.

The scrubber has two modes: high efficiency (default), and low efficiency. Toggle between the two modes by using a soldering iron on the machine. In low efficiency mode the amount of pollution removed per second is halved, but the turbine also takes half the damage (although the filter still takes the same amount of damage). In low efficiency mode the turbine will also never completely break, when its durability approaches zero the scrubber will stop working. You can use this if you figure out some way to repair the turbine.

Finally, starting from ZPM tier, the scrubber will also remove 1/4th of the normal amount from all 8 chunks directly and diagonally adjacent to the chunk it is working in. This comes as a free bonus, the removal from the working chunk is not affected.


 * Detailed pollution scrubber calculation:




 * Where:
 * is the amount of pollution that the scrubber removes from its chunk every second.
 * is the energy tier of the machine (LV = 1, MV = 2, ...) However, anything below MV is also considered tier 2, so that the formula doesn't just return zero. In other words, ULV, LV, and MV scrubbers all remove pollution at the same rate.
 * counts how many sides of the machine are exposed to air. (0-6, good luck getting 6)
 * is the Efficiency value of the turbine. (150% Efficiency = 1.5)
 * is the Air flow of the turbine. For almost all turbine materials this is equal to the Optimal Steam flow value in L/t that is shown in the tooltip. Only a handful of uncommon materials (the only really notable being Ichorium) get a specific bonus to Steam flow, which is not applied to Air flow. To my knowledge Air flow is not shown anywhere in game, you would have to dig through the code to find out.
 * is the integer floor function.


 * Ignoring rounding, this simplifies to approximately:




 * However, the rounding error can be fairly large because the rounding is performed on small values in practice.


 * As noted above, a scrubber running in low efficiency mode will remove half the  value from the chunk it is in every second, and a ZPM scrubber or better will also remove   (or   in low efficiency mode) from the eight directly and diagonally adjacent chunks.

Finally, just a small quirk of the scrubber: It will never remove more than half of the current pollution from a chunk in one operation. So when the pollution in the chunk gets low (less than twice the  value), the scrubber will remove less and less of it with every operation. But it will still damage the turbine and the filter at the same rate. If this is a problem for you, consider using a Pollution Detector to shut the scrubber down when pollution level gets low.



Electric Air Filters
The ultimate answer to all your pollution removal is the Electric Air Filter (EAF) multiblock. The multiblock comes in three tiers: T1 is available in LV, T2 in HV, and T3 in IV. Each tier increases the working range of the filter and pollution removal speed. Different EAF tiers also consume different amounts of power: These values aren't listed anywhere, you can find them by scanning the EAF controller, or by reading the code. If you fail to provide sufficient power, the EAF will shut down, like any other multiblock.
 * Electric Air Filter T1 consumes 30 EU/t (LV).
 * Electric Air Filter T2 consumes 480 EU/t (HV).
 * Electric Air Filter T3 consumes 7,680 EU/t (IV).

The EAF requires a Turbine rotor to run, which should be placed in the controller's GUI. The only stat of the turbine that matters is its Efficiency. Unlike the single block Scrubbers, the Air Filter does not damage the turbine at all. This seems to be intended, I have found no trace of any code that attempts to damage the turbine in any way. You can make your turbine as efficient as you can, regardless of material cost, and never have to worry about replacing it!

In addition to the turbine efficiency, the rate of pollution cleaning can be increased in multiple ways:
 * Adding more muffler hatches. The multiblock can house up to eight muffler hatches in the middle two blocks of each side (see picture). Every hatch increases the pollution cleaning efficiency, there should never be any reason to build it with fewer than eight.
 * Using higher tier muffler hatches. However, the highest "effective" tier of a muffler hatch is the same as the power tier you use to run the EAF. For example, if you run the EAF on HV power, even if you have IV mufflers, they will still only count as HV.
 * However, since the EAF does not overclock, regardless of the tier of energy hatches, it will always draw the same amount of EU/t!


 * Using an Absorption Filter. Note that this is a different item from the Air Filter [Tier x] that is used in the single block Pollution Scrubbers. Clean Absorption Filters should be placed in an input bus, and the multiblock will eventually output dirty ones in an output bus.

Do not throw away the dirty filters! You can clean them in a Centrifuge, with a high chance of getting a clean filter back! Starting in EV, the return is guaranteed, so filters can be completely recycled without ever having to make new ones. Plus you also get some carbon and liquid pollution back, which can be processed into a few semi-common materials if you'd like.

Using an Absorption Filter doubles the amount of pollution that the EAF removes per second, so it is definitely worth it! One filter lasts in the EAF for 300 seconds of continuous operation (30 "work cycles", where each lasts for 10 seconds).

If you want to know how much pollution your Air Filter removes, use a Portable Scanner on the controller. Note that the value you will see is pollution removed per tick, if you want the value per second multiply it by 20. (But at least this time the value is actually correct.)

If you would like to know before you build the multiblock, see below:




 * Where:
 * is the amount of pollution that the EAF removes from a chunk every second.
 * depends on the tier of the EAF: for T1 the bonus is 1, for T2 it is 1.05, and for T3 it is 1.1.
 * is the Efficiency value of the turbine placed in the controller. (150% Efficiency = 1.5)
 * is the tier of the -th muffler hatch, for all mufflers in the multiblock structure (LV = 1, MV = 2, ...) Remember that a muffler can only count as a tier equal or lower than the power tier the EAF is running at.
 * If you simply use  identical muffler hatches, you can replace this term in the formula by just.
 * is the number of maintenance issues the multiblock has. If it is running without any issues, the last factor is just 1 and you can leave it out.
 * is the integer floor function.


 * As noted above, if the EAF is holding an Absorption Filter, then  is further multiplied by 2.


 * Example: An Electric Air Filter T2 is running on HV power, and has 8 HV muffler hatches. It is using a Vibrant Alloy Turbine (115% efficiency) and is supplied with Absorption Filters. The amount of pollution removed per second is: . This is enough to keep up with the pollution generated by 21 Electric Blast Furnaces!

The EAF can clean pollution in a large area, which increases with its tier: T1 works on 3x3 chunks, T2 on 5x5, and T3 on 7x7. If you would like to constrain the machine to work in a smaller area, shift-right-click the controller with a screwdriver.

Every second, the EAF picks one chunk in its working area. By default, the chunks are chosen in a fixed sequence and the EAF sweeps the entire working area over and over. If you wish, you can change it to pick chunks from the working area at random by right-clicking (without shift) the controller with a screwdriver. The random mode never picks chunks that have no pollution in them. Sequential mode always considers all chunks. Therefore if only a few chunks in the area have any pollution, random mode will get them cleaned faster. Either way, pollution in the chosen chunk gets reduced by the  amount calculated above.

Commands
If you are an admin (op) on a server, or you are playing singleplayer with cheats enabled, you can use the command  to modify the amount of pollution in your current chunk. Positive numbers add that amount of gibbl to the chunk, negative numbers subtract from it.

Configuration Options
Several facets of pollution can be tweaked in  for players who want either an easier or a more punishing experience. You can change the pollution thresholds for smog, poison, vegetation destruction, and sour rain; change how much pollution certain machines generate; or ultimately set  to completely disable the pollution mechanic. However this will not remove existing pollution from chunks that already have it, you will need to do that yourself.