MinecraftForge/MinecraftForge — pull request #216 by ScottKillen (2012-10-19 23:38:02+00:00)
Title: Forge Hooks for Terrain Generation

### Summary ###
This change adds several Forge events to the terrain gen system, allowing modders to access most functionality.

### Method ###
To reduce event bus noise, I did not add events at every possible action--instead, especially in high use code, I bracketed blocks of code with pre and post events and wrapped the bracketed code with cancellable events in case complete replacement was desired by the modder. The only exception is in ore generation where an event fires for each ore to allow precise mod control and protect compatibility.

### List of Events Added ###
* *InitializeBiomeGeneratorsEvent* - Allows complete control over generation of the biome layer.
* *SetBiomeSizeEvent* - Allows adjustment of the biome size parameter.
* *ChunkInitTerrainNoiseEvent* - allows replacement or editing of the outout of the terrain noise generator.
* *BiomeCreateDecoratorEvent* - Allows replacement of the BiomeDecorators for vanilla biomes.
* *PreOreGenerationevent* - Fires just before any ore generation code is called.
* *PostOreGenerationEvent* - Fires just after all ore generation code is called.
* *CoalGenerationEvent, etc.* - an event fires for each ore being generated.
* *BiomeGetVillageBlockEvent* - allows mods to alter village construction blocks by biome.
* *BiomeGetVillageBlockMetadataEvent* - allows mods to alter village construction blocks by biome.
* *ChunkPreSetMapFeatureLocationsEvent* - Fires before structure locations are set in a chunk.
* *ChunkSetMapFeatureLocationsEvent* - Allows replacement of the code that sets structure locations in a chunk.
* *ChunkPostSetMapFeatureLocationsEvent* - Fires after structure locations are set in a chunk.
* *ChunkPreMapFeaturesGenerateEvent* - Fires before structures are generated in a chunk.
* *ChunkMapFeaturesGenerateEvent* - allows replacement of code that generates structures in a chunk.
* *ChunkPostMapFeaturesGenerateEvent* - Fires after structures are generated in a chunk.
* *Nether versions of the last six events.*
* *ChunkPreGenerateCavesAndRavinesEvent* - Fires before caves and ravines are generated in a chunk.
* *ChunkGenerateCavesAndRavinesEvent* - Allows replacement of cave and ravine generating code.
* *ChunkPostGenerateCavesAndRavinesEvent* - Fires after caves and ravines are generated in a chunk.
* *Nether versions of the last three events (for nether caves)*
* *ReplaceBlocksForBiomeEvent* - Allows alteration of the mechanism used to replace blocks by biome during terrain gen for a chunk.
* *SaplingGrowTreeEvent* - Allows modification of the types of trees grown by saplings.