001 package net.minecraftforge.event.terraingen; 002 003 import net.minecraft.src.*; 004 import net.minecraftforge.event.*; 005 006 public class ChunkProviderEvent extends Event 007 { 008 009 public final IChunkProvider chunkProvider; 010 011 public ChunkProviderEvent(IChunkProvider chunkProvider) 012 { 013 this.chunkProvider = chunkProvider; 014 } 015 016 /** 017 * This event is fired when a chunks blocks are replaced by a biomes top and 018 * filler blocks. 019 * 020 * You can set the result to DENY to prevent the default replacement. 021 */ 022 @HasResult 023 public static class ReplaceBiomeBlocks extends ChunkProviderEvent 024 { 025 public final int chunkX; 026 public final int chunkZ; 027 public final byte[] blockArray; 028 public final BiomeGenBase[] biomeArray; 029 030 public ReplaceBiomeBlocks(IChunkProvider chunkProvider, int chunkX, int chunkZ, byte[] blockArray, BiomeGenBase[] biomeArray) 031 { 032 super(chunkProvider); 033 this.chunkX = chunkX; 034 this.chunkZ = chunkZ; 035 this.blockArray = blockArray; 036 this.biomeArray = biomeArray; 037 } 038 039 } 040 041 /** 042 * This event is fired before a chunks terrain noise field is initialized. 043 * 044 * You can set the result to DENY to substitute your own noise field. 045 */ 046 @HasResult 047 public static class InitNoiseField extends ChunkProviderEvent 048 { 049 public double[] noisefield; 050 public final int posX; 051 public final int posY; 052 public final int posZ; 053 public final int sizeX; 054 public final int sizeY; 055 public final int sizeZ; 056 057 public InitNoiseField(IChunkProvider chunkProvider, double[] noisefield, int posX, int posY, int posZ, int sizeX, int sizeY, int sizeZ) 058 { 059 super(chunkProvider); 060 this.noisefield = noisefield; 061 this.posX = posX; 062 this.posY = posY; 063 this.posZ = posZ; 064 this.sizeX = sizeX; 065 this.sizeY = sizeX; 066 this.sizeZ = sizeZ; 067 } 068 069 } 070 }