java类net.minecraft.world.gen.structure.MapGenMineshaft的实例源码

ChunkProviderUnderdark.java 文件源码 项目:ExtraUtilities 阅读 23 收藏 0 点赞 0 评论 0
public ChunkProviderUnderdark(final World par1World, final long par2, final boolean par4) {
    super(par1World, par2, par4, "2;7,80x1,4,69x0,100x1,7;3;stronghold,dungeon,mineshaft,decoration");
    this.r = new Random();
    this.caveGenerator = new MapGenCaves();
    this.mineshaftGenerator = new MapGenMineshaft();
    this.ravineGenerator = new MapGenRavine();
    this.holes_gen = new WorldGenBigHole();
    this.castle_gen = new WorldGenCastle();
    this.tree_gen = new WorldGenBedrockTree();
    this.base_array = new Block[65536];
    this.worldObj = par1World;
    this.rand = new Random(par2);
    for (int i = 0; i < this.base_array.length; ++i) {
        this.base_array[i] = Blocks.air;
    }
    for (int x = 0; x < 16; ++x) {
        for (int z = 0; z < 16; ++z) {
            for (int y = 0; y <= 83; ++y) {
                this.base_array[(x * 16 + z) * 128 + y] = Blocks.stone;
            }
        }
    }
}
ChunkProviderOverworld.java 文件源码 项目:CustomWorldGen 阅读 27 收藏 0 点赞 0 评论 0
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();
}
MapGenMineshaftDeadzone.java 文件源码 项目:ClockworkPhase2 阅读 16 收藏 0 点赞 0 评论 0
public MapGenMineshaftDeadzone(MapGenMineshaft base) {
    this.childGen = base;
}
ChunkProviderFlat.java 文件源码 项目:Resilience-Client-Source 阅读 20 收藏 0 点赞 0 评论 0
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();
        }
    }
}
ChunkProviderNillax.java 文件源码 项目:ZeroQuest 阅读 23 收藏 0 点赞 0 评论 0
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];
}
ChunkProviderDarkax.java 文件源码 项目:ZeroQuest 阅读 23 收藏 0 点赞 0 评论 0
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];
}
ChunkProviderFlat.java 文件源码 项目:Cauldron 阅读 29 收藏 0 点赞 0 评论 0
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();
        }
    }
}
ChunkProviderFlat.java 文件源码 项目:Cauldron 阅读 23 收藏 0 点赞 0 评论 0
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();
        }
    }
}
ChunkProviderFlat.java 文件源码 项目:RuneCraftery 阅读 23 收藏 0 点赞 0 评论 0
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();
      }
   }

}
ChunkProviderFlat.java 文件源码 项目:RuneCraftery 阅读 20 收藏 0 点赞 0 评论 0
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();
        }
    }
}
ChunkProviderFlat.java 文件源码 项目:BetterNutritionMod 阅读 27 收藏 0 点赞 0 评论 0
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();
        }
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号