public ChunkProviderFlat(World p_i2004_1_, long p_i2004_2_, boolean p_i2004_4_, String p_i2004_5_) { this.field_73163_a = p_i2004_1_; this.field_73161_b = new Random(p_i2004_2_); this.field_82699_e = FlatGeneratorInfo.func_82651_a(p_i2004_5_); if(p_i2004_4_) { Map var6 = this.field_82699_e.func_82644_b(); if(var6.containsKey("village")) { Map var7 = (Map)var6.get("village"); if(!var7.containsKey("size")) { var7.put("size", "1"); } this.field_82696_f.add(new MapGenVillage(var7)); } if(var6.containsKey("biome_1")) { this.field_82696_f.add(new MapGenScatteredFeature((Map)var6.get("biome_1"))); } if(var6.containsKey("mineshaft")) { this.field_82696_f.add(new MapGenMineshaft((Map)var6.get("mineshaft"))); } if(var6.containsKey("stronghold")) { this.field_82696_f.add(new MapGenStronghold((Map)var6.get("stronghold"))); } } this.field_82697_g = this.field_82699_e.func_82644_b().containsKey("decoration"); if(this.field_82699_e.func_82644_b().containsKey("lake")) { this.field_82703_i = new WorldGenLakes(Block.field_71943_B.field_71990_ca); } if(this.field_82699_e.func_82644_b().containsKey("lava_lake")) { this.field_82701_j = new WorldGenLakes(Block.field_71938_D.field_71990_ca); } this.field_82702_h = this.field_82699_e.func_82644_b().containsKey("dungeon"); Iterator var9 = this.field_82699_e.func_82650_c().iterator(); while(var9.hasNext()) { FlatLayerInfo var10 = (FlatLayerInfo)var9.next(); for(int var8 = var10.func_82656_d(); var8 < var10.func_82656_d() + var10.func_82657_a(); ++var8) { this.field_82700_c[var8] = (byte)(var10.func_82659_b() & 255); this.field_82698_d[var8] = (byte)var10.func_82658_c(); } } }
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 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(Block.waterStill.blockID); } if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake")) { this.lavaLakeGenerator = new WorldGenLakes(Block.lavaStill.blockID); } 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] = (byte)(flatlayerinfo.getFillBlock() & 255); this.cachedBlockMetadata[j] = (byte)flatlayerinfo.getFillBlockMeta(); } } }