public ChunkProviderOverworld(World worldIn, long seed, boolean mapFeaturesEnabledIn, String p_i46668_5_) { { caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); strongholdGenerator = (MapGenStronghold)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(strongholdGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD); villageGenerator = (MapGenVillage)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE); mineshaftGenerator = (MapGenMineshaft)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaftGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); scatteredFeatureGenerator = (MapGenScatteredFeature)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(scatteredFeatureGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); ravineGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(ravineGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE); oceanMonumentGenerator = (StructureOceanMonument)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(oceanMonumentGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT); } this.worldObj = worldIn; this.mapFeaturesEnabled = mapFeaturesEnabledIn; this.terrainType = worldIn.getWorldInfo().getTerrainType(); this.rand = new Random(seed); this.minLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16); this.maxLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16); this.mainPerlinNoise = new NoiseGeneratorOctaves(this.rand, 8); this.surfaceNoise = new NoiseGeneratorPerlin(this.rand, 4); this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10); this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16); this.forestNoise = new NoiseGeneratorOctaves(this.rand, 8); this.heightMap = new double[825]; this.biomeWeights = new float[25]; for (int i = -2; i <= 2; ++i) { for (int j = -2; j <= 2; ++j) { float f = 10.0F / MathHelper.sqrt_float((float)(i * i + j * j) + 0.2F); this.biomeWeights[i + 2 + (j + 2) * 5] = f; } } if (p_i46668_5_ != null) { this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i46668_5_).build(); this.oceanBlock = this.settings.useLavaOceans ? Blocks.LAVA.getDefaultState() : Blocks.WATER.getDefaultState(); worldIn.setSeaLevel(this.settings.seaLevel); } net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld ctx = new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld(minLimitPerlinNoise, maxLimitPerlinNoise, mainPerlinNoise, surfaceNoise, scaleNoise, depthNoise, forestNoise); ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx); this.minLimitPerlinNoise = ctx.getLPerlin1(); this.maxLimitPerlinNoise = ctx.getLPerlin2(); this.mainPerlinNoise = ctx.getPerlin(); this.surfaceNoise = ctx.getHeight(); this.scaleNoise = ctx.getScale(); this.depthNoise = ctx.getDepth(); this.forestNoise = ctx.getForest(); }
public ChunkProviderFlat(World par1World, long par2, boolean par4, String par5Str) { this.worldObj = par1World; this.random = new Random(par2); this.flatWorldGenInfo = FlatGeneratorInfo.createFlatGeneratorFromString(par5Str); if (par4) { Map var6 = this.flatWorldGenInfo.getWorldFeatures(); if (var6.containsKey("village")) { Map var7 = (Map)var6.get("village"); if (!var7.containsKey("size")) { var7.put("size", "1"); } this.structureGenerators.add(new MapGenVillage(var7)); } if (var6.containsKey("biome_1")) { this.structureGenerators.add(new MapGenScatteredFeature((Map)var6.get("biome_1"))); } if (var6.containsKey("mineshaft")) { this.structureGenerators.add(new MapGenMineshaft((Map)var6.get("mineshaft"))); } if (var6.containsKey("stronghold")) { this.structureGenerators.add(new MapGenStronghold((Map)var6.get("stronghold"))); } } this.hasDecoration = this.flatWorldGenInfo.getWorldFeatures().containsKey("decoration"); if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lake")) { this.waterLakeGenerator = new WorldGenLakes(Blocks.water); } if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake")) { this.lavaLakeGenerator = new WorldGenLakes(Blocks.lava); } this.hasDungeons = this.flatWorldGenInfo.getWorldFeatures().containsKey("dungeon"); Iterator var9 = this.flatWorldGenInfo.getFlatLayers().iterator(); while (var9.hasNext()) { FlatLayerInfo var10 = (FlatLayerInfo)var9.next(); for (int var8 = var10.getMinY(); var8 < var10.getMinY() + var10.getLayerCount(); ++var8) { this.cachedBlockIDs[var8] = var10.func_151536_b(); this.cachedBlockMetadata[var8] = (byte)var10.getFillBlockMeta(); } } }
public ChunkProviderNillax(World worldIn, long p_i45636_2_, boolean p_i45636_4_, String p_i45636_5_) { this.field_177476_s = Blocks.water; this.stoneNoise = new double[256]; this.caveGenerator = new MapGenCaves(); //this.strongholdGenerator = new MapGenStronghold(); this.villageGenerator = new MapGenNileVillage(); this.mineshaftGenerator = new MapGenMineshaft(); this.scatteredFeatureGenerator = new MapGenScatteredFeature(); this.ravineGenerator = new MapGenRavine(); //this.oceanMonumentGenerator = new StructureOceanMonument(); this.worldObj = worldIn; this.mapFeaturesEnabled = p_i45636_4_; this.field_177475_o = worldIn.getWorldInfo().getTerrainType(); this.rand = new Random(p_i45636_2_); this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16); this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16); this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8); this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4); this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); this.field_147434_q = new double[825]; this.parabolicField = new float[25]; for (int j = -2; j <= 2; ++j) { for (int k = -2; k <= 2; ++k) { float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F); this.parabolicField[j + 2 + (k + 2) * 5] = f; } } if (p_i45636_5_ != null) { this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i45636_5_).func_177864_b(); this.field_177476_s = this.settings.useLavaOceans ? Blocks.lava : Blocks.water; } NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise}; noiseGens = TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, noiseGens); this.field_147431_j = (NoiseGeneratorOctaves)noiseGens[0]; this.field_147432_k = (NoiseGeneratorOctaves)noiseGens[1]; this.field_147429_l = (NoiseGeneratorOctaves)noiseGens[2]; this.field_147430_m = (NoiseGeneratorPerlin)noiseGens[3]; this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4]; this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5]; this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6]; }
public ChunkProviderDarkax(World worldIn, long p_i45636_2_, boolean p_i45636_4_, String p_i45636_5_) { this.field_177476_s = Blocks.lava; this.stoneNoise = new double[256]; this.caveGenerator = new MapGenCaves(); //this.strongholdGenerator = new MapGenStronghold(); this.villageGenerator = new MapGenNileVillage(); this.mineshaftGenerator = new MapGenMineshaft(); this.scatteredFeatureGenerator = new MapGenScatteredFeature(); this.ravineGenerator = new MapGenRavine(); //this.oceanMonumentGenerator = new StructureOceanMonument(); this.worldObj = worldIn; this.mapFeaturesEnabled = p_i45636_4_; this.field_177475_o = worldIn.getWorldInfo().getTerrainType(); this.rand = new Random(p_i45636_2_); this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16); this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16); this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8); this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4); this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10); this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16); this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8); this.field_147434_q = new double[825]; this.parabolicField = new float[25]; for (int j = -2; j <= 2; ++j) { for (int k = -2; k <= 2; ++k) { float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F); this.parabolicField[j + 2 + (k + 2) * 5] = f; } } if (p_i45636_5_ != null) { this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i45636_5_).func_177864_b(); this.field_177476_s = this.settings.useLavaOceans ? Blocks.lava : Blocks.lava; } NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise}; noiseGens = TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, noiseGens); this.field_147431_j = (NoiseGeneratorOctaves)noiseGens[0]; this.field_147432_k = (NoiseGeneratorOctaves)noiseGens[1]; this.field_147429_l = (NoiseGeneratorOctaves)noiseGens[2]; this.field_147430_m = (NoiseGeneratorPerlin)noiseGens[3]; this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4]; this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5]; this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6]; }
public ChunkProviderFlat(World p_i2004_1_, long p_i2004_2_, boolean p_i2004_4_, String p_i2004_5_) { this.worldObj = p_i2004_1_; this.random = new Random(p_i2004_2_); this.flatWorldGenInfo = FlatGeneratorInfo.createFlatGeneratorFromString(p_i2004_5_); if (p_i2004_4_) { Map map = this.flatWorldGenInfo.getWorldFeatures(); if (map.containsKey("village")) { Map map1 = (Map)map.get("village"); if (!map1.containsKey("size")) { map1.put("size", "1"); } this.structureGenerators.add(new MapGenVillage(map1)); } if (map.containsKey("biome_1")) { this.structureGenerators.add(new MapGenScatteredFeature((Map)map.get("biome_1"))); } if (map.containsKey("mineshaft")) { this.structureGenerators.add(new MapGenMineshaft((Map)map.get("mineshaft"))); } if (map.containsKey("stronghold")) { this.structureGenerators.add(new MapGenStronghold((Map)map.get("stronghold"))); } } this.hasDecoration = this.flatWorldGenInfo.getWorldFeatures().containsKey("decoration"); if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lake")) { this.waterLakeGenerator = new WorldGenLakes(Blocks.water); } if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake")) { this.lavaLakeGenerator = new WorldGenLakes(Blocks.lava); } this.hasDungeons = this.flatWorldGenInfo.getWorldFeatures().containsKey("dungeon"); Iterator iterator = this.flatWorldGenInfo.getFlatLayers().iterator(); while (iterator.hasNext()) { FlatLayerInfo flatlayerinfo = (FlatLayerInfo)iterator.next(); for (int j = flatlayerinfo.getMinY(); j < flatlayerinfo.getMinY() + flatlayerinfo.getLayerCount(); ++j) { this.cachedBlockIDs[j] = flatlayerinfo.func_151536_b(); this.cachedBlockMetadata[j] = (byte)flatlayerinfo.getFillBlockMeta(); } } }