User:Abdiel Kavash/Pollution

From GT New Horizons

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 the 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.

Generating Pollution

Tooltip of a Bricked Blast Furnace, showing that it causes 200 pollution per second.
A Bricked Blast Furnace causes 200 pollution per second.

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 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 generate pollution continuously every 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 400 * 0.75 = 300 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, for now refer to this table:

Pollution by Rocket Tier (in gibbl/sec)
Rocket tier While ignited While flying
Tier 1 100 10,000
Tier 2 200 20,000
Cargo 200 20,000
Tier 3 400 40,000
Tier 4 800 80,000
Tier 5 1,600 160,000
Tier 6 3,200 320,000
Tier 7 6,400 640,000
Tier 8 12,800 1,280,000


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

Nuclear Control information panel displaying information from a Pollution Detection Device.
Pollution Detection Device and an Information Panel displaying the amount of pollution in a chunk.

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.

Picture of a polluted area. Distain terrain is shrouded in grey fog.
Smog in a polluted area.

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:

  • Level = 1 + (pollution / 400,000), rounded down.
  • Duration = (pollution / 1,000) 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.
    • Duration = (pollution / 500,000) 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.
    • Duration = (pollution / 2,000) ticks, up to a maximum of 1,000 ticks (50 seconds).
  • Poison:
    • Level = 1 + (pollution / 500,000), rounded down.
    • Duration = (pollution / 4,000) ticks, up to a maximum of 1,000 ticks (50 seconds).

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

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 Pollution / 25,000 is chosen from the chunk during each "pollution check" (see below). The selection process slightly prioritizes blocks near height y = 60, 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.
Picture of a heavily polluted area. Heavy fog and smoke particles cover the screen.
A very heavily polluted area. Don't let it get this bad!

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.

Dealing with Pollution

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 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. (0.9945 * (0.95)^4)

Preventing Pollution

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

The simplest 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; IV mufflers and higher require the Tier 2 filters. The filters can be inserted 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 0.64^(Hatch tier - 1) of the base amount (LV = tier 1), this is the amount shown on the tooltip. Without a filter the hatch reduces pollution output to 0.70^(Hatch tier - 1) of base. Even without a filter these are much more efficient than the basic muffler hatches!

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 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.


You can also combat pollution by planning your infrastructure in a smart way. There are at least two possible approaches:

  • 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!

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.


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!

Pollution Scrubbers

Commands

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

Configuration Options

Several facets of pollution can be tweaked in .minecraft\config\GregTech.cfg 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 B:EnablePollution=false to completely disable the pollution mechanic. Note that this will not remove existing pollution from chunks that already have it, you will need to do that yourself.