Search in sources :

Example 1 with WorldGenLiquidLakes

use of stevekung.mods.moreplanets.util.world.gen.feature.WorldGenLiquidLakes 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)

Example 2 with WorldGenLiquidLakes

use of stevekung.mods.moreplanets.util.world.gen.feature.WorldGenLiquidLakes in project MorePlanets by SteveKunG.

the class ChunkGeneratorChalos 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 biomeGen = this.worldObj.getBiome(pos.add(16, 0, 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(chunkX * var7 + chunkZ * var9 ^ this.worldObj.getSeed());
    biomeGen.decorate(this.worldObj, this.rand, pos);
    this.biomedecoratorplanet.decorate(this.worldObj, this.rand, biomeGen, pos);
    WorldEntitySpawner.performWorldGenSpawning(this.worldObj, biomeGen, x + 8, z + 8, 16, 16, this.rand);
    int worldX = chunkX << 4;
    int worldZ = chunkZ << 4;
    this.generateGas(this.worldObj, this.rand, worldX + 15, worldZ + 15);
    this.dungeonGenerator.generateStructure(this.worldObj, this.rand, new ChunkPos(chunkX, chunkZ));
    for (int i = 0; i < 8; ++i) {
        new WorldGenSpaceDungeons(ChalosBlocks.CHALOS_ANCIENT_CHEST, ChalosBlocks.CHALOS_BLOCK, ChalosBlocks.CHEESE_SLIME_BLOCK, 1, 0).generate(this.worldObj, this.rand, pos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    if (biomeGen != MPBiomes.SLIMELY_WASTELAND && this.rand.nextInt(8) == 0) {
        new WorldGenLiquidLakes(ChalosBlocks.CHEESE_OF_MILK_FLUID_BLOCK, ChalosBlocks.CHALOS_BLOCK, 0, false).generate(this.worldObj, this.rand, pos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    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)

Example 3 with WorldGenLiquidLakes

use of stevekung.mods.moreplanets.util.world.gen.feature.WorldGenLiquidLakes in project MorePlanets by SteveKunG.

the class ChunkGeneratorNibiru method populate.

@Override
public void populate(int chunkX, int chunkZ) {
    BlockFalling.fallInstantly = true;
    int x = chunkX * 16;
    int z = chunkZ * 16;
    BlockPos blockpos = new BlockPos(x, 0, z);
    Biome biomegenbase = this.worldObj.getBiome(blockpos.add(16, 0, 16));
    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());
    ChunkPos chunkcoordintpair = new ChunkPos(chunkX, chunkZ);
    this.biomedecoratorplanet.decorate(this.worldObj, this.rand, biomegenbase, blockpos);
    this.mineshaftGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.strongholdGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.pyramidGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.jungleTempleGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.oceanMonumentGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.villageGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    this.dungeonGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
    if (biomegenbase != MPBiomes.INFECTED_OCEAN && biomegenbase != MPBiomes.INFECTED_DEEP_OCEAN && biomegenbase != MPBiomes.INFECTED_RIVER) {
        int worldX = chunkX << 4;
        int worldZ = chunkZ << 4;
        this.generateGas(this.worldObj, this.rand, worldX + 15, worldZ + 15);
        this.generateOil(this.worldObj, this.rand, worldX + 15, worldZ + 15);
    }
    if (biomegenbase != MPBiomes.INFECTED_DESERT && biomegenbase != MPBiomes.GREEN_VEIN && this.rand.nextInt(4) == 0) {
        new WorldGenLiquidLakes(NibiruBlocks.INFECTED_WATER_FLUID_BLOCK, NibiruBlocks.NIBIRU_BLOCK, 0, false).generate(this.worldObj, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    if (biomegenbase == MPBiomes.GREEN_VEIN && this.rand.nextInt(6) == 0) {
        new WorldGenLiquidLakes(NibiruBlocks.PURIFY_WATER_FLUID_BLOCK, NibiruBlocks.TERRASTONE, 0, true).generate(this.worldObj, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    if (this.rand.nextInt(8) == 0) {
        int y = this.rand.nextInt(this.rand.nextInt(248) + 8);
        if (y < 63 || this.rand.nextInt(10) == 0) {
            new WorldGenLiquidLakes(Blocks.LAVA, NibiruBlocks.NIBIRU_BLOCK, 0, true).generate(this.worldObj, this.rand, blockpos.add(this.rand.nextInt(16) + 8, y, this.rand.nextInt(16) + 8));
        }
    }
    for (int i = 0; i < 8; ++i) {
        new WorldGenSpaceDungeons(NibiruBlocks.NIBIRU_ANCIENT_CHEST, NibiruBlocks.NIBIRU_BLOCK, NibiruBlocks.NIBIRU_BLOCK, 1, 2).generate(this.worldObj, this.rand, blockpos.add(this.rand.nextInt(16) + 8, this.rand.nextInt(256), this.rand.nextInt(16) + 8));
    }
    biomegenbase.decorate(this.worldObj, this.rand, blockpos);
    WorldEntitySpawner.performWorldGenSpawning(this.worldObj, biomegenbase, x + 8, z + 8, 16, 16, this.rand);
    blockpos = blockpos.add(8, 0, 8);
    for (int snowX = 0; snowX < 16; ++snowX) {
        for (int snowZ = 0; snowZ < 16; ++snowZ) {
            BlockPos blockpos1 = this.worldObj.getPrecipitationHeight(blockpos.add(snowX, 0, snowZ));
            BlockPos blockpos2 = blockpos1.down();
            if (this.worldObj.canBlockFreezeWater(blockpos2)) {
                this.worldObj.setBlockState(blockpos2, NibiruBlocks.INFECTED_ICE.getDefaultState(), 2);
            }
            if (this.worldObj.canSnowAt(blockpos1, true)) {
                this.worldObj.setBlockState(blockpos1, NibiruBlocks.INFECTED_SNOW_LAYER.getDefaultState(), 2);
            }
        }
    }
    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)

Aggregations

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