--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderHell.java
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderHell.java
@@ -24,6 +24,13 @@
 import net.minecraft.world.gen.feature.WorldGenMinable;
 import net.minecraft.world.gen.feature.WorldGenerator;
 import net.minecraft.world.gen.structure.MapGenNetherBridge;
+import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*;
+import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.*;
+import static net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.*;
+import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*;
+import net.minecraftforge.common.*;
+import net.minecraftforge.fml.common.eventhandler.Event.*;
+import net.minecraftforge.event.terraingen.*;
 
 public class ChunkProviderHell implements IChunkProvider
 {
@@ -65,18 +72,30 @@
         this.field_177472_y = new WorldGenHellLava(Blocks.field_150356_k, false);
         this.field_177471_z = new GeneratorBushFeature(Blocks.field_150338_P);
         this.field_177465_A = new GeneratorBushFeature(Blocks.field_150337_Q);
-        this.field_73172_c = new MapGenNetherBridge();
-        this.field_73182_t = new MapGenCavesHell();
+        this.field_73172_c = (MapGenNetherBridge) TerrainGen.getModdedMapGen(new MapGenNetherBridge(), NETHER_BRIDGE);
+        this.field_73182_t = TerrainGen.getModdedMapGen(new MapGenCavesHell(), NETHER_CAVE);
         this.field_73175_o = p_i45637_1_;
         this.field_177466_i = p_i45637_2_;
         this.field_73181_i = new Random(p_i45637_3_);
-        this.field_73178_j = new NoiseGeneratorOctaves(this.field_73181_i, 16);
-        this.field_73179_k = new NoiseGeneratorOctaves(this.field_73181_i, 16);
-        this.field_73176_l = new NoiseGeneratorOctaves(this.field_73181_i, 8);
-        this.field_73177_m = new NoiseGeneratorOctaves(this.field_73181_i, 4);
-        this.field_73174_n = new NoiseGeneratorOctaves(this.field_73181_i, 4);
-        this.field_73173_a = new NoiseGeneratorOctaves(this.field_73181_i, 10);
-        this.field_73171_b = new NoiseGeneratorOctaves(this.field_73181_i, 16);
+
+        NoiseGenerator[] noiseGens =
+        {
+                new NoiseGeneratorOctaves(this.field_73181_i, 16),
+                new NoiseGeneratorOctaves(this.field_73181_i, 16),
+                new NoiseGeneratorOctaves(this.field_73181_i, 8),
+                new NoiseGeneratorOctaves(this.field_73181_i, 4),
+                new NoiseGeneratorOctaves(this.field_73181_i, 4),
+                new NoiseGeneratorOctaves(this.field_73181_i, 10),
+                new NoiseGeneratorOctaves(this.field_73181_i, 16)
+        };
+        noiseGens = TerrainGen.getModdedNoiseGenerators(p_i45637_1_, this.field_73181_i, noiseGens);
+        this.field_73178_j = (NoiseGeneratorOctaves)noiseGens[0];
+        this.field_73179_k = (NoiseGeneratorOctaves)noiseGens[1];
+        this.field_73176_l = (NoiseGeneratorOctaves)noiseGens[2];
+        this.field_73177_m = (NoiseGeneratorOctaves)noiseGens[3];
+        this.field_73174_n = (NoiseGeneratorOctaves)noiseGens[4];
+        this.field_73173_a = (NoiseGeneratorOctaves)noiseGens[5];
+        this.field_73171_b = (NoiseGeneratorOctaves)noiseGens[6];
     }
 
     public void func_180515_a(int p_180515_1_, int p_180515_2_, ChunkPrimer p_180515_3_)
@@ -155,6 +174,10 @@
 
     public void func_180516_b(int p_180516_1_, int p_180516_2_, ChunkPrimer p_180516_3_)
     {
+        ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180516_1_, p_180516_2_, p_180516_3_, this.field_73175_o);
+        MinecraftForge.EVENT_BUS.post(event);
+        if (event.getResult() == Result.DENY) return;
+
         byte b0 = 64;
         double d0 = 0.03125D;
         this.field_73185_q = this.field_73177_m.func_76304_a(this.field_73185_q, p_180516_1_ * 16, p_180516_2_ * 16, 0, 16, 16, 1, d0, d0, 1.0D);
@@ -272,6 +295,10 @@
 
     private double[] func_73164_a(double[] p_73164_1_, int p_73164_2_, int p_73164_3_, int p_73164_4_, int p_73164_5_, int p_73164_6_, int p_73164_7_)
     {
+        ChunkProviderEvent.InitNoiseField event = new ChunkProviderEvent.InitNoiseField(this, p_73164_1_, p_73164_2_, p_73164_3_, p_73164_4_, p_73164_5_, p_73164_6_, p_73164_7_);
+        MinecraftForge.EVENT_BUS.post(event);
+        if (event.getResult() == Result.DENY) return event.noisefield;
+
         if (p_73164_1_ == null)
         {
             p_73164_1_ = new double[p_73164_5_ * p_73164_6_ * p_73164_7_];
@@ -365,47 +392,58 @@
     public void func_73153_a(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
     {
         BlockFalling.field_149832_M = true;
+
+        MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, field_73175_o, field_73181_i, p_73153_2_, p_73153_3_, false));
+
         BlockPos blockpos = new BlockPos(p_73153_2_ * 16, 0, p_73153_3_ * 16);
         ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);
         this.field_73172_c.func_175794_a(this.field_73175_o, this.field_73181_i, chunkcoordintpair);
         int k;
 
-        for (k = 0; k < 8; ++k)
+        boolean doGen = TerrainGen.populate(p_73153_1_, field_73175_o, field_73181_i, p_73153_2_, p_73153_3_, false, NETHER_LAVA);
+        for (k = 0; doGen && k < 8; ++k)
         {
             this.field_177472_y.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(120) + 4, this.field_73181_i.nextInt(16) + 8));
         }
 
-        for (k = 0; k < this.field_73181_i.nextInt(this.field_73181_i.nextInt(10) + 1) + 1; ++k)
+        doGen = TerrainGen.populate(p_73153_1_, field_73175_o, field_73181_i, p_73153_2_, p_73153_3_, false, FIRE);
+        for (k = 0; doGen && k < this.field_73181_i.nextInt(this.field_73181_i.nextInt(10) + 1) + 1; ++k)
         {
             this.field_177470_t.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(120) + 4, this.field_73181_i.nextInt(16) + 8));
         }
 
-        for (k = 0; k < this.field_73181_i.nextInt(this.field_73181_i.nextInt(10) + 1); ++k)
+        doGen = TerrainGen.populate(p_73153_1_, field_73175_o, field_73181_i, p_73153_2_, p_73153_3_, false, GLOWSTONE);
+        for (k = 0; doGen && k < this.field_73181_i.nextInt(this.field_73181_i.nextInt(10) + 1); ++k)
         {
             this.field_177469_u.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(120) + 4, this.field_73181_i.nextInt(16) + 8));
         }
 
-        for (k = 0; k < 10; ++k)
+        for (k = 0; doGen && k < 10; ++k)
         {
             this.field_177468_v.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(128), this.field_73181_i.nextInt(16) + 8));
         }
 
-        if (this.field_73181_i.nextBoolean())
+        MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(field_73175_o, field_73181_i, blockpos));
+
+        doGen = TerrainGen.decorate(field_73175_o, field_73181_i, blockpos, SHROOM);
+        if (doGen && this.field_73181_i.nextBoolean())
         {
             this.field_177471_z.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(128), this.field_73181_i.nextInt(16) + 8));
         }
 
-        if (this.field_73181_i.nextBoolean())
+        if (doGen && this.field_73181_i.nextBoolean())
         {
             this.field_177465_A.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16) + 8, this.field_73181_i.nextInt(128), this.field_73181_i.nextInt(16) + 8));
         }
 
-        for (k = 0; k < 16; ++k)
+        doGen = TerrainGen.generateOre(field_73175_o, field_73181_i, field_177467_w, blockpos, QUARTZ);
+        for (k = 0; doGen && k < 16; ++k)
         {
             this.field_177467_w.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16), this.field_73181_i.nextInt(108) + 10, this.field_73181_i.nextInt(16)));
         }
 
-        for (k = 0; k < 16; ++k)
+        doGen = TerrainGen.populate(p_73153_1_, field_73175_o, field_73181_i, p_73153_2_, p_73153_3_, false, NETHER_LAVA2);
+        for (k = 0; doGen && k < 16; ++k)
         {
             this.field_177473_x.func_180709_b(this.field_73175_o, this.field_73181_i, blockpos.func_177982_a(this.field_73181_i.nextInt(16), this.field_73181_i.nextInt(108) + 10, this.field_73181_i.nextInt(16)));
         }
