Search in sources :

Example 1 with WorldGenCrashedAlienProbe

use of stevekung.mods.moreplanets.module.planets.diona.world.gen.feature.WorldGenCrashedAlienProbe in project MorePlanets by SteveKunG.

the class ChunkProviderDiona method populate.

@Override
public void populate(int chunkX, int chunkZ) {
    BlockFalling.fallInstantly = true;
    int x = chunkX * 16;
    int z = chunkZ * 16;
    BlockPos pos = new BlockPos(x, 0, z);
    Biome biomegenbase = this.worldObj.getBiome(pos.add(16, 0, 16));
    ChunkPos chunkcoordintpair = new ChunkPos(chunkX, chunkZ);
    this.rand.setSeed(this.worldObj.getSeed());
    long k = this.rand.nextLong() / 2L * 2L + 1L;
    long l = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(chunkX * k + chunkZ * l ^ this.worldObj.getSeed());
    WorldEntitySpawner.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand);
    this.dungeonGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.biomeDecorator.decorate(this.worldObj, this.rand, biomegenbase, pos);
    this.mineshaftGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    int y = this.rand.nextInt(this.rand.nextInt(248) + 8);
    if (this.rand.nextInt(4) == 0) {
        if (y < 48) {
            new WorldGenLiquidLakes(DionaBlocks.CRYSTALLIZE_WATER_FLUID_BLOCK, DionaBlocks.DIONA_BLOCK, 2, false).generate(this.worldObj, this.rand, pos.add(this.rand.nextInt(16) + 8, y, this.rand.nextInt(16) + 8));
        }
    }
    if (this.rand.nextInt(8) == 0) {
        if (y < 48) {
            new WorldGenLiquidLakes(DionaBlocks.CRYSTALLIZE_LAVA_FLUID_BLOCK, DionaBlocks.DIONA_BLOCK, 2, true).generate(this.worldObj, this.rand, pos.add(this.rand.nextInt(16) + 8, y, this.rand.nextInt(16) + 8));
        }
    }
    for (int i = 0; i < 8; ++i) {
        new WorldGenSpaceDungeons(DionaBlocks.DIONA_ANCIENT_CHEST, DionaBlocks.DIONA_BLOCK, DionaBlocks.ALBETIUS_WORM_EGG_ROCK, 0).generate(this.worldObj, this.rand, pos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    if (this.rand.nextInt(250) == 0) {
        int i2 = this.rand.nextInt(16) + 8;
        int k3 = this.rand.nextInt(16) + 8;
        int l2 = this.worldObj.getTopSolidOrLiquidBlock(pos.add(i2, 0, k3)).getY();
        new WorldGenCrashedAlienProbe().generate(this.worldObj, this.rand, pos.add(i2, l2, k3));
    }
    BlockFalling.fallInstantly = false;
}
Also used : WorldGenLiquidLakes(stevekung.mods.moreplanets.util.world.gen.feature.WorldGenLiquidLakes) Biome(net.minecraft.world.biome.Biome) WorldGenSpaceDungeons(stevekung.mods.moreplanets.util.world.gen.feature.WorldGenSpaceDungeons) BlockPos(net.minecraft.util.math.BlockPos) ChunkPos(net.minecraft.util.math.ChunkPos) WorldGenCrashedAlienProbe(stevekung.mods.moreplanets.module.planets.diona.world.gen.feature.WorldGenCrashedAlienProbe)

Aggregations

BlockPos (net.minecraft.util.math.BlockPos)1 ChunkPos (net.minecraft.util.math.ChunkPos)1 Biome (net.minecraft.world.biome.Biome)1 WorldGenCrashedAlienProbe (stevekung.mods.moreplanets.module.planets.diona.world.gen.feature.WorldGenCrashedAlienProbe)1 WorldGenLiquidLakes (stevekung.mods.moreplanets.util.world.gen.feature.WorldGenLiquidLakes)1 WorldGenSpaceDungeons (stevekung.mods.moreplanets.util.world.gen.feature.WorldGenSpaceDungeons)1