Java 类net.minecraft.world.gen.feature.WorldGenDungeons 实例源码

项目:TRHS_Club_Mod_2016    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.field_78818_a,   3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     DesertPyramid.field_74941_i,             2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     JunglePyramid.field_74943_l,         2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, JunglePyramid.field_74944_m,     2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ChestCorridor.field_75003_a,             2,  4);
    addInfo(STRONGHOLD_LIBRARY,       Library.field_75007_b,            1,  5);
    addInfo(STRONGHOLD_CROSSING,      RoomCrossing.field_75014_c,  1,  5);
    addInfo(VILLAGE_BLACKSMITH,       House2.field_74918_a,             3,  9);
    addInfo(BONUS_CHEST,              WorldServer.field_73069_S,                    10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                   8,  8);

    ItemStack book = new ItemStack(Items.field_151134_bR, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:CauldronGit    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,   3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     DesertPyramid.itemsToGenerateInTemple,             2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     JunglePyramid.junglePyramidsChestContents,         2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, JunglePyramid.junglePyramidsDispenserContents,     2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ChestCorridor.strongholdChestContents,             2,  4);
    addInfo(STRONGHOLD_LIBRARY,       Library.strongholdLibraryChestContents,            1,  5);
    addInfo(STRONGHOLD_CROSSING,      RoomCrossing.strongholdRoomCrossingChestContents,  1,  5);
    addInfo(VILLAGE_BLACKSMITH,       House2.villageBlacksmithChestContents,             3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                    10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                   8,  8);

    ItemStack book = new ItemStack(Items.enchanted_book, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:Cauldron    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,   3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     DesertPyramid.itemsToGenerateInTemple,             2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     JunglePyramid.junglePyramidsChestContents,         2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, JunglePyramid.junglePyramidsDispenserContents,     2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ChestCorridor.strongholdChestContents,             2,  4);
    addInfo(STRONGHOLD_LIBRARY,       Library.strongholdLibraryChestContents,            1,  5);
    addInfo(STRONGHOLD_CROSSING,      RoomCrossing.strongholdRoomCrossingChestContents,  1,  5);
    addInfo(VILLAGE_BLACKSMITH,       House2.villageBlacksmithChestContents,             3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                    10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                   8,  8);

    ItemStack book = new ItemStack(Items.enchanted_book, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:Cauldron    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,   3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     DesertPyramid.itemsToGenerateInTemple,             2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     JunglePyramid.junglePyramidsChestContents,         2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, JunglePyramid.junglePyramidsDispenserContents,     2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ChestCorridor.strongholdChestContents,             2,  4);
    addInfo(STRONGHOLD_LIBRARY,       Library.strongholdLibraryChestContents,            1,  5);
    addInfo(STRONGHOLD_CROSSING,      RoomCrossing.strongholdRoomCrossingChestContents,  1,  5);
    addInfo(VILLAGE_BLACKSMITH,       House2.villageBlacksmithChestContents,             3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                    10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                   8,  8);

    ItemStack book = new ItemStack(Items.enchanted_book, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:Cauldron    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,   3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     DesertPyramid.itemsToGenerateInTemple,             2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     JunglePyramid.junglePyramidsChestContents,         2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, JunglePyramid.junglePyramidsDispenserContents,     2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ChestCorridor.strongholdChestContents,             2,  4);
    addInfo(STRONGHOLD_LIBRARY,       Library.strongholdLibraryChestContents,            1,  5);
    addInfo(STRONGHOLD_CROSSING,      RoomCrossing.strongholdRoomCrossingChestContents,  1,  5);
    addInfo(VILLAGE_BLACKSMITH,       House2.villageBlacksmithChestContents,             3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                    10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                   8,  8);

    ItemStack book = new ItemStack(Items.enchanted_book, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:RuneCraftery    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,                         3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     ComponentScatteredFeatureDesertPyramid.itemsToGenerateInTemple,          2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     ComponentScatteredFeatureJunglePyramid.junglePyramidsChestContents,      2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, ComponentScatteredFeatureJunglePyramid.junglePyramidsDispenserContents,  2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ComponentStrongholdChestCorridor.strongholdChestContents,                2,  4);
    addInfo(STRONGHOLD_LIBRARY,       ComponentStrongholdLibrary.strongholdLibraryChestContents,               1,  5);
    addInfo(STRONGHOLD_CROSSING,      ComponentStrongholdRoomCrossing.strongholdRoomCrossingChestContents,     1,  5);
    addInfo(VILLAGE_BLACKSMITH,       ComponentVillageHouse2.villageBlacksmithChestContents,                   3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                                          10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                                         8,  8);

    ItemStack book = new ItemStack(Item.enchantedBook, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:RuneCraftery    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,                         3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     ComponentScatteredFeatureDesertPyramid.itemsToGenerateInTemple,          2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     ComponentScatteredFeatureJunglePyramid.junglePyramidsChestContents,      2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, ComponentScatteredFeatureJunglePyramid.junglePyramidsDispenserContents,  2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ComponentStrongholdChestCorridor.strongholdChestContents,                2,  4);
    addInfo(STRONGHOLD_LIBRARY,       ComponentStrongholdLibrary.strongholdLibraryChestContents,               1,  5);
    addInfo(STRONGHOLD_CROSSING,      ComponentStrongholdRoomCrossing.strongholdRoomCrossingChestContents,     1,  5);
    addInfo(VILLAGE_BLACKSMITH,       ComponentVillageHouse2.villageBlacksmithChestContents,                   3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                                          10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                                         8,  8);

    ItemStack book = new ItemStack(Item.enchantedBook, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:BetterNutritionMod    文件:ChestGenHooks.java   
private static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    addInfo(MINESHAFT_CORRIDOR,       StructureMineshaftPieces.mineshaftChestContents,                         3,  7);
    addInfo(PYRAMID_DESERT_CHEST,     ComponentScatteredFeatureDesertPyramid.itemsToGenerateInTemple,          2,  7);
    addInfo(PYRAMID_JUNGLE_CHEST,     ComponentScatteredFeatureJunglePyramid.junglePyramidsChestContents,      2,  7);
    addInfo(PYRAMID_JUNGLE_DISPENSER, ComponentScatteredFeatureJunglePyramid.junglePyramidsDispenserContents,  2,  2);
    addInfo(STRONGHOLD_CORRIDOR,      ComponentStrongholdChestCorridor.strongholdChestContents,                2,  4);
    addInfo(STRONGHOLD_LIBRARY,       ComponentStrongholdLibrary.strongholdLibraryChestContents,               1,  5);
    addInfo(STRONGHOLD_CROSSING,      ComponentStrongholdRoomCrossing.strongholdRoomCrossingChestContents,     1,  5);
    addInfo(VILLAGE_BLACKSMITH,       ComponentVillageHouse2.villageBlacksmithChestContents,                   3,  9);
    addInfo(BONUS_CHEST,              WorldServer.bonusChestContent,                                          10, 10);
    addInfo(DUNGEON_CHEST,            WorldGenDungeons.field_111189_a,                                         8,  8);

    ItemStack book = new ItemStack(Item.enchantedBook, 1, 0);
    WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
    getInfo(MINESHAFT_CORRIDOR  ).addItem(tmp);
    getInfo(PYRAMID_DESERT_CHEST).addItem(tmp);
    getInfo(PYRAMID_JUNGLE_CHEST).addItem(tmp);
    getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
    getInfo(STRONGHOLD_LIBRARY  ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
    getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
    getInfo(DUNGEON_CHEST       ).addItem(tmp);
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:Backmemed    文件:ChunkProviderFlat.java   
public void populate(int x, int z)
{
    int i = x * 16;
    int j = z * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    Biome biome = this.worldObj.getBiome(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)x * k + (long)z * l ^ this.worldObj.getSeed());
    ChunkPos chunkpos = new ChunkPos(x, z);

    for (MapGenStructure mapgenstructure : this.structureGenerators.values())
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkpos);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.getSeaLevel() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biome.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:CustomWorldGen    文件:ChunkProviderFlat.java   
public void populate(int x, int z)
{
    net.minecraft.block.BlockFalling.fallInstantly = true;
    int i = x * 16;
    int j = z * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    Biome biome = this.worldObj.getBiome(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)x * k + (long)z * l ^ this.worldObj.getSeed());
    ChunkPos chunkpos = new ChunkPos(x, z);

    net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.worldObj, this.random, x, z, flag);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkpos);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.getSeaLevel() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biome.decorate(this.worldObj, this.random, blockpos);
    }

    net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.worldObj, this.random, x, z, flag);
    net.minecraft.block.BlockFalling.fallInstantly = false;
}
项目:PopularMMOS-EpicProportions-Mod    文件:ChunkProviderEpic.java   
/**
 * Populates chunk with ores etc etc
 */
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    BlockFalling.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    //Enable map features ??
    if (this.mapFeaturesEnabled) {
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }
    int k1;
    int l1;
    int i2;

    //Add Lakes ??
    if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0
            && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(256);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);
    }

    //Add Lakes ??
    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0)  {
            (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
        }
    }

    //Add Dungeons ??
    boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
    for (k1 = 0; doGen && k1 < 8; ++k1) {
        l1 = k + this.rand.nextInt(16) + 8;
        i2 = this.rand.nextInt(256);
        int j2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2);
    }

    //Add Animals ??
    biomegenbase.decorate(this.worldObj, this.rand, k, l);
    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) {
        SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    }
    k += 8;
    l += 8;

    //Creates snow and ice in world.
    doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE);
    for (k1 = 0; doGen && k1 < 16; ++k1) {
        for (l1 = 0; l1 < 16; ++l1) {
            i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1);

            if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2);
            }

            if (this.worldObj.func_147478_e(k1 + k, i2, l1 + l, true)) {
                this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow_layer, 0, 2);
            }
        }
    }
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));
    BlockFalling.fallInstantly = false;
}
项目:Resilience-Client-Source    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    boolean var7 = false;
    this.random.setSeed(this.worldObj.getSeed());
    long var8 = this.random.nextLong() / 2L * 2L + 1L;
    long var10 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)par2 * var8 + (long)par3 * var10 ^ this.worldObj.getSeed());
    Iterator var12 = this.structureGenerators.iterator();

    while (var12.hasNext())
    {
        MapGenStructure var13 = (MapGenStructure)var12.next();
        boolean var14 = var13.generateStructuresInChunk(this.worldObj, this.random, par2, par3);

        if (var13 instanceof MapGenVillage)
        {
            var7 |= var14;
        }
    }

    int var17;
    int var16;
    int var18;

    if (this.waterLakeGenerator != null && !var7 && this.random.nextInt(4) == 0)
    {
        var16 = var4 + this.random.nextInt(16) + 8;
        var17 = this.random.nextInt(256);
        var18 = var5 + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, var16, var17, var18);
    }

    if (this.lavaLakeGenerator != null && !var7 && this.random.nextInt(8) == 0)
    {
        var16 = var4 + this.random.nextInt(16) + 8;
        var17 = this.random.nextInt(this.random.nextInt(248) + 8);
        var18 = var5 + this.random.nextInt(16) + 8;

        if (var17 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, var16, var17, var18);
        }
    }

    if (this.hasDungeons)
    {
        for (var16 = 0; var16 < 8; ++var16)
        {
            var17 = var4 + this.random.nextInt(16) + 8;
            var18 = this.random.nextInt(256);
            int var15 = var5 + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, var17, var18, var15);
        }
    }

    if (this.hasDecoration)
    {
        var6.decorate(this.worldObj, this.random, var4, var5);
    }
}
项目:Resilience-Client-Source    文件:ChunkProviderGenerate.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockFalling.field_149832_M = true;
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long)par2 * var7 + (long)par3 * var9 ^ this.worldObj.getSeed());
    boolean var11 = false;

    if (this.mapFeaturesEnabled)
    {
        this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        var11 = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int var12;
    int var13;
    int var14;

    if (var6 != BiomeGenBase.desert && var6 != BiomeGenBase.desertHills && !var11 && this.rand.nextInt(4) == 0)
    {
        var12 = var4 + this.rand.nextInt(16) + 8;
        var13 = this.rand.nextInt(256);
        var14 = var5 + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, var12, var13, var14);
    }

    if (!var11 && this.rand.nextInt(8) == 0)
    {
        var12 = var4 + this.rand.nextInt(16) + 8;
        var13 = this.rand.nextInt(this.rand.nextInt(248) + 8);
        var14 = var5 + this.rand.nextInt(16) + 8;

        if (var13 < 63 || this.rand.nextInt(10) == 0)
        {
            (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, var12, var13, var14);
        }
    }

    for (var12 = 0; var12 < 8; ++var12)
    {
        var13 = var4 + this.rand.nextInt(16) + 8;
        var14 = this.rand.nextInt(256);
        int var15 = var5 + this.rand.nextInt(16) + 8;
        (new WorldGenDungeons()).generate(this.worldObj, this.rand, var13, var14, var15);
    }

    var6.decorate(this.worldObj, this.rand, var4, var5);
    SpawnerAnimals.performWorldGenSpawning(this.worldObj, var6, var4 + 8, var5 + 8, 16, 16, this.rand);
    var4 += 8;
    var5 += 8;

    for (var12 = 0; var12 < 16; ++var12)
    {
        for (var13 = 0; var13 < 16; ++var13)
        {
            var14 = this.worldObj.getPrecipitationHeight(var4 + var12, var5 + var13);

            if (this.worldObj.isBlockFreezable(var12 + var4, var14 - 1, var13 + var5))
            {
                this.worldObj.setBlock(var12 + var4, var14 - 1, var13 + var5, Blocks.ice, 0, 2);
            }

            if (this.worldObj.func_147478_e(var12 + var4, var14, var13 + var5, true))
            {
                this.worldObj.setBlock(var12 + var4, var14, var13 + var5, Blocks.snow_layer, 0, 2);
            }
        }
    }

    BlockFalling.field_149832_M = false;
}
项目:TheDarkEra    文件:TDEChunkProvider.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    BlockFalling.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    if (this.mapFeaturesEnabled) {
        this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int k1;
    int l1;
    int i2;

    if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) {

        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(256);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakesTDE(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);
    }

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0) {
            (new WorldGenLakesTDE(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
        }
    }

    boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
    for (k1 = 0; doGen && k1 < 8; ++k1) {
        l1 = k + this.rand.nextInt(16) + 8;
        i2 = this.rand.nextInt(256);
        int j2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2);
    }

    biomegenbase.decorate(this.worldObj, this.rand, k, l);
    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) {
        SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    }
    k += 8;
    l += 8;

    doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE);
    for (k1 = 0; doGen && k1 < 16; ++k1) {
        for (l1 = 0; l1 < 16; ++l1) {
            i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1);

            if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2);
            }

            if (this.worldObj.func_147478_e(k1 + k, i2, l1 + l, true)) {
                this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow_layer, 0, 2);
            }
        }

    }

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    BlockFalling.fallInstantly = false;
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int k = p_73153_2_ * 16;
    int l = p_73153_3_ * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, p_73153_2_, p_73153_3_);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int l1;
    int i2;
    int j2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(256);
        j2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(this.random.nextInt(248) + 8);
        j2 = l + this.random.nextInt(16) + 8;

        if (i2 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            i2 = k + this.random.nextInt(16) + 8;
            j2 = this.random.nextInt(256);
            int k1 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, i2, j2, k1);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int k = p_73153_2_ * 16;
    int l = p_73153_3_ * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, p_73153_2_, p_73153_3_);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int l1;
    int i2;
    int j2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(256);
        j2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(this.random.nextInt(248) + 8);
        j2 = l + this.random.nextInt(16) + 8;

        if (i2 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            i2 = k + this.random.nextInt(16) + 8;
            j2 = this.random.nextInt(256);
            int k1 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, i2, j2, k1);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
public void func_73153_a(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) {
   int var4 = p_73153_2_ * 16;
   int var5 = p_73153_3_ * 16;
   BiomeGenBase var6 = this.field_73163_a.func_72807_a(var4 + 16, var5 + 16);
   boolean var7 = false;
   this.field_73161_b.setSeed(this.field_73163_a.func_72905_C());
   long var8 = this.field_73161_b.nextLong() / 2L * 2L + 1L;
   long var10 = this.field_73161_b.nextLong() / 2L * 2L + 1L;
   this.field_73161_b.setSeed((long)p_73153_2_ * var8 + (long)p_73153_3_ * var10 ^ this.field_73163_a.func_72905_C());
   Iterator var12 = this.field_82696_f.iterator();

   while(var12.hasNext()) {
      MapGenStructure var13 = (MapGenStructure)var12.next();
      boolean var14 = var13.func_75051_a(this.field_73163_a, this.field_73161_b, p_73153_2_, p_73153_3_);
      if(var13 instanceof MapGenVillage) {
         var7 |= var14;
      }
   }

   int var17;
   int var16;
   int var18;
   if(this.field_82703_i != null && !var7 && this.field_73161_b.nextInt(4) == 0) {
      var16 = var4 + this.field_73161_b.nextInt(16) + 8;
      var17 = this.field_73161_b.nextInt(128);
      var18 = var5 + this.field_73161_b.nextInt(16) + 8;
      this.field_82703_i.func_76484_a(this.field_73163_a, this.field_73161_b, var16, var17, var18);
   }

   if(this.field_82701_j != null && !var7 && this.field_73161_b.nextInt(8) == 0) {
      var16 = var4 + this.field_73161_b.nextInt(16) + 8;
      var17 = this.field_73161_b.nextInt(this.field_73161_b.nextInt(120) + 8);
      var18 = var5 + this.field_73161_b.nextInt(16) + 8;
      if(var17 < 63 || this.field_73161_b.nextInt(10) == 0) {
         this.field_82701_j.func_76484_a(this.field_73163_a, this.field_73161_b, var16, var17, var18);
      }
   }

   if(this.field_82702_h) {
      for(var16 = 0; var16 < 8; ++var16) {
         var17 = var4 + this.field_73161_b.nextInt(16) + 8;
         var18 = this.field_73161_b.nextInt(128);
         int var15 = var5 + this.field_73161_b.nextInt(16) + 8;
         (new WorldGenDungeons()).func_76484_a(this.field_73163_a, this.field_73161_b, var17, var18, var15);
      }
   }

   if(this.field_82697_g) {
      var6.func_76728_a(this.field_73163_a, this.field_73161_b, var4, var5);
   }

}
项目:RuneCraftery    文件:ChunkProviderGenerate.java   
public void func_73153_a(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) {
   BlockSand.field_72192_a = true;
   int var4 = p_73153_2_ * 16;
   int var5 = p_73153_3_ * 16;
   BiomeGenBase var6 = this.field_73230_p.func_72807_a(var4 + 16, var5 + 16);
   this.field_73220_k.setSeed(this.field_73230_p.func_72905_C());
   long var7 = this.field_73220_k.nextLong() / 2L * 2L + 1L;
   long var9 = this.field_73220_k.nextLong() / 2L * 2L + 1L;
   this.field_73220_k.setSeed((long)p_73153_2_ * var7 + (long)p_73153_3_ * var9 ^ this.field_73230_p.func_72905_C());
   boolean var11 = false;
   if(this.field_73229_q) {
      this.field_73223_w.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_);
      var11 = this.field_73224_v.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_);
      this.field_73225_u.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_);
      this.field_73233_x.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_);
   }

   int var12;
   int var13;
   int var14;
   if(var6 != BiomeGenBase.field_76769_d && var6 != BiomeGenBase.field_76786_s && !var11 && this.field_73220_k.nextInt(4) == 0) {
      var12 = var4 + this.field_73220_k.nextInt(16) + 8;
      var13 = this.field_73220_k.nextInt(128);
      var14 = var5 + this.field_73220_k.nextInt(16) + 8;
      (new WorldGenLakes(Block.field_71943_B.field_71990_ca)).func_76484_a(this.field_73230_p, this.field_73220_k, var12, var13, var14);
   }

   if(!var11 && this.field_73220_k.nextInt(8) == 0) {
      var12 = var4 + this.field_73220_k.nextInt(16) + 8;
      var13 = this.field_73220_k.nextInt(this.field_73220_k.nextInt(120) + 8);
      var14 = var5 + this.field_73220_k.nextInt(16) + 8;
      if(var13 < 63 || this.field_73220_k.nextInt(10) == 0) {
         (new WorldGenLakes(Block.field_71938_D.field_71990_ca)).func_76484_a(this.field_73230_p, this.field_73220_k, var12, var13, var14);
      }
   }

   for(var12 = 0; var12 < 8; ++var12) {
      var13 = var4 + this.field_73220_k.nextInt(16) + 8;
      var14 = this.field_73220_k.nextInt(128);
      int var15 = var5 + this.field_73220_k.nextInt(16) + 8;
      (new WorldGenDungeons()).func_76484_a(this.field_73230_p, this.field_73220_k, var13, var14, var15);
   }

   var6.func_76728_a(this.field_73230_p, this.field_73220_k, var4, var5);
   SpawnerAnimals.func_77191_a(this.field_73230_p, var6, var4 + 8, var5 + 8, 16, 16, this.field_73220_k);
   var4 += 8;
   var5 += 8;

   for(var12 = 0; var12 < 16; ++var12) {
      for(var13 = 0; var13 < 16; ++var13) {
         var14 = this.field_73230_p.func_72874_g(var4 + var12, var5 + var13);
         if(this.field_73230_p.func_72884_u(var12 + var4, var14 - 1, var13 + var5)) {
            this.field_73230_p.func_72832_d(var12 + var4, var14 - 1, var13 + var5, Block.field_72036_aT.field_71990_ca, 0, 2);
         }

         if(this.field_73230_p.func_72858_w(var12 + var4, var14, var13 + var5)) {
            this.field_73230_p.func_72832_d(var12 + var4, var14, var13 + var5, Block.field_72037_aS.field_71990_ca, 0, 2);
         }
      }
   }

   BlockSand.field_72192_a = false;
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, par2, par3);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int k1;
    int l1;
    int i2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        k1 = this.random.nextInt(128);
        i2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, k1, i2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        k1 = this.random.nextInt(this.random.nextInt(120) + 8);
        i2 = l + this.random.nextInt(16) + 8;

        if (k1 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, k1, i2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            k1 = k + this.random.nextInt(16) + 8;
            i2 = this.random.nextInt(128);
            int j2 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, k1, i2, j2);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:BetterNutritionMod    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, par2, par3);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int k1;
    int l1;
    int i2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        k1 = this.random.nextInt(128);
        i2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, k1, i2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        k1 = this.random.nextInt(this.random.nextInt(120) + 8);
        i2 = l + this.random.nextInt(16) + 8;

        if (k1 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, k1, i2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            k1 = k + this.random.nextInt(16) + 8;
            i2 = this.random.nextInt(128);
            int j2 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, k1, i2, j2);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:AgeCraft-Old    文件:AgeChunkProvider.java   
@Override
public void populate(IChunkProvider chunkProvider, int chunkX, int chunkZ) {
    BlockFalling.fallInstantly = true;
    int x = chunkX * 16;
    int z = chunkZ * 16;
    BiomeGenBase biome = world.getBiomeGenForCoords(x + 16, z + 16);
    random.setSeed(world.getSeed());
    long randLong1 = random.nextLong() / 2L * 2L + 1L;
    long randLong2 = random.nextLong() / 2L * 2L + 1L;
    random.setSeed((long) chunkX * randLong1 + (long) chunkZ * randLong2 ^ world.getSeed());
    boolean flag = false;
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(chunkProvider, world, random, chunkX, chunkZ, flag));
    if(mapFeaturesEnabled) {
        populateMapGenerators(chunkProvider, chunkX, chunkX);
    }
    int xx;
    int yy;
    int zz;
    if(biome != BiomeGenBase.desert && biome != BiomeGenBase.desertHills && !flag && random.nextInt(4) == 0 && TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, LAKE)) {
        xx = x + random.nextInt(16) + 8;
        yy = random.nextInt(256);
        zz = z + random.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(world, random, xx, yy, zz);
    }
    if(TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, LAVA) && !flag && this.random.nextInt(8) == 0) {
        xx = x + random.nextInt(16) + 8;
        yy = random.nextInt(random.nextInt(248) + 8);
        zz = z + random.nextInt(16) + 8;
        if(yy < 63 || random.nextInt(10) == 0) {
            (new WorldGenLakes(Blocks.lava)).generate(world, random, xx, yy, zz);
        }
    }
    boolean doGen = TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, DUNGEON);
    for(xx = 0; doGen && xx < 8; ++xx) {
        yy = x + random.nextInt(16) + 8;
        zz = random.nextInt(256);
        int j2 = z + random.nextInt(16) + 8;
        (new WorldGenDungeons()).generate(world, random, yy, zz, j2);
    }

    if(biome instanceof AgeBiome) {
        AgeBiome ageBiome = (AgeBiome) biome;
        ageBiome.chunkProvider = this;
        ageBiome.decorate(world, random, x, z);
        ageBiome.chunkProvider = null;
    } else {
        biome.decorate(world, random, x, z);
    }
    SpawnerAnimals.performWorldGenSpawning(world, biome, x + 8, z + 8, 16, 16, random);
    x += 8;
    z += 8;

    doGen = TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, ICE);
    for(xx = 0; doGen && xx < 16; ++xx) {
        for(yy = 0; yy < 16; ++yy) {
            zz = world.getPrecipitationHeight(x + xx, z + yy);
            if(world.isBlockFreezable(xx + x, zz - 1, yy + z)) {
                world.setBlock(xx + x, zz - 1, yy + z, Blocks.ice, 0, 2);
            }
            if(world.func_147478_e(xx + x, zz, yy + z, true)) {
                world.setBlock(xx + x, zz, yy + z, Blocks.snow_layer, 0, 2);
            }
        }
    }
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(chunkProvider, world, random, chunkX, chunkZ, flag));
    BlockFalling.fallInstantly = false;
}
项目:Eldritch-Infusion    文件:ChunkProviderEI.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    BlockSand.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    if (this.mapFeaturesEnabled) {
        this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int k1;
    int l1;
    int i2;

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(128);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Block.waterStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);
    }

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(120) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0) {
            (new WorldGenLakes(Block.lavaStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);
        }
    }

    boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
    for (k1 = 0; doGen && k1 < 8; ++k1) {
        l1 = k + this.rand.nextInt(16) + 8;
        i2 = this.rand.nextInt(128);
        int j2 = l + this.rand.nextInt(16) + 8;

        if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) {
            ;
        }
    }

    biomegenbase.decorate(this.worldObj, this.rand, k, l);
    SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    k += 8;
    l += 8;

    doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE);
    for (k1 = 0; doGen && k1 < 16; ++k1) {
        for (l1 = 0; l1 < 16; ++l1) {
            i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1);

            if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Block.ice.blockID, 0, 2);
            }

            if (this.worldObj.canSnowAt(k1 + k, i2, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2, l1 + l, Block.snow.blockID, 0, 2);
            }
        }
    }

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    BlockSand.fallInstantly = false;
}
项目:Eldritch-Infusion    文件:ChunkProviderEI.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    BlockSand.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    if (this.mapFeaturesEnabled) {
        this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int k1;
    int l1;
    int i2;

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(128);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);
    }

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(120) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0) {
            (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
        }
    }

    boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
    for (k1 = 0; doGen && k1 < 8; ++k1) {
        l1 = k + this.rand.nextInt(16) + 8;
        i2 = this.rand.nextInt(128);
        int j2 = l + this.rand.nextInt(16) + 8;

        if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) {
            ;
        }
    }

    biomegenbase.decorate(this.worldObj, this.rand, k, l);
    SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    k += 8;
    l += 8;

    doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE);
    for (k1 = 0; doGen && k1 < 16; ++k1) {
        for (l1 = 0; l1 < 16; ++l1) {
            i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1);

            if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2);
            }

            if (this.worldObj.canSnowAt(k1 + k, i2, l1 + l)) {
                this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow, 0, 2);
            }
        }
    }

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    BlockSand.fallInstantly = false;
}
项目:powell.cellarium    文件:RasterlandChunkProvider.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    BlockSand.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    if (this.mapFeaturesEnabled) {
        //  this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        System.out.println("flag is " + flag);
        this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
        this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }

    int k1;
    int l1;
    int i2;

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(128);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Fluids.blockRasterWasser.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);
    }

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(120) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0) {
            (new WorldGenLakes(Block.lavaStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);
        }
    }

    boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
    for (k1 = 0; doGen && k1 < 8; ++k1) {
        l1 = k + this.rand.nextInt(16) + 8;
        i2 = this.rand.nextInt(128);
        int j2 = l + this.rand.nextInt(16) + 8;

        if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) {
            ;
        }
    }

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    BlockSand.fallInstantly = false;
}