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

If pollution in a chunk becomes too high, it will slowly spread to the four adjacent chunks. Pollution also slowly dissipates over time by itself.

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

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.

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 safe rule of thumb, if a multiblock structure includes a muffler hatch, it will cause some pollution.

Machines only generate pollution while running. Overclocking a machine to make it run faster does not make the machine generate more pollution.


Other sources of pollution include machine explosions (due to overvolting, fire, or otherwise), which generate a huge amount of pollution at once (millions of gibbl). Rocket launches also cause a large amount of pollution, see the tooltip of the rocket for details.

Measuring Pollution

Nuclear Control information panel displaying info from a Pollution Detection Device.
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. 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 output 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, you can craft the hand-held Portable Scanner, which can also give 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 begin causing 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.

Smog

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

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.

Pollution also creates a visual fog effect, which gets more intense as the pollution levels increase.

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 block coordinates 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 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.
  • Mossy Cobblestone gets turned into regular Cobblestone.
  • Grass (block) gets turned into Dirt.
  • Dirt and farmland get turned into Sand.

Sour Rain

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!

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 or bad: pollution will affect a larger area, but since the spread moves the pollution around it helps mitigate its impact on the chunk that your machines are in.

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 pollution amount 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 can spread to all four neighbors of the chunk in each cycle. 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% per 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 generate 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 generates no pollution at all! Check the tooltip of a muffler hatch to see how much pollution it lets through.

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.