Search in sources :

Example 1 with WorldGenFlowersMP

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

the class BiomeDecoratorChalos method generate.

@Override
protected void generate(Biome biome, World world, Random rand) {
    int i;
    for (i = 0; i < this.cheeseSporeFlowerPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(ChalosBlocks.CHEESE_SPORE_FLOWER.getDefaultState()), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.cheeseTallGrassPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(ChalosBlocks.CHEESE_TALL_GRASS.getDefaultState()), world, rand, this.chunkPos);
    }
    int chance;
    chance = this.cheeseSporeTreePerChunk;
    if (rand.nextInt(1) == 0) {
        --chance;
    }
    if (rand.nextInt(6) == 0) {
        ++chance;
    }
    for (i = 0; i < chance; ++i) {
        DecorateHelper.generateCustomTrees(new WorldGenCheeseSporeTree(6 + rand.nextInt(4), true), world, rand, biome, this.chunkPos);
    }
    chance = this.cheeseSporeStemPerChunk;
    if (rand.nextInt(1) == 0) {
        --chance;
    }
    if (rand.nextInt(8) == 0) {
        ++chance;
    }
    for (i = 0; i < chance; ++i) {
        DecorateHelper.generateCustomTrees(new WorldGenCheeseSporeTree(6 + rand.nextInt(4), false), world, rand, biome, this.chunkPos);
    }
}
Also used : WorldGenCheeseSporeTree(stevekung.mods.moreplanets.module.planets.chalos.world.gen.feature.WorldGenCheeseSporeTree) WorldGenFlowersMP(stevekung.mods.moreplanets.util.world.gen.feature.WorldGenFlowersMP)

Example 2 with WorldGenFlowersMP

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

the class BiomeDecoratorNibiru method generate.

@Override
protected void generate(Biome biome, World world, Random rand) {
    int i;
    for (i = 0; i < this.infectedTallGrassPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_TALL_GRASS.getDefaultState().withProperty(BlockNibiruTallGrass.VARIANT, BlockNibiruTallGrass.BlockType.INFECTED_TALL_GRASS)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.pureHurbPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.PURE_HURB)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.terrapuffHurbPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.TERRAPUFF_HURB)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.batasiaDandelionPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.BATASIA_DANDELION)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.pyoloniaPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.PYOLONIA_FLOWER)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.philipyPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.PHILIPY_FLOWER)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.whiteTailPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.WHITE_TAIL)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.vealiumVinePerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.VEALIUM_VINE_FLOWER)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.seaweedPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenNibiruSeaweed(NibiruBlocks.NIBIRU_SEAWEED.getDefaultState().withProperty(BlockNibiruSeaweed.VARIANT, BlockNibiruSeaweed.BlockType.NIBIRU_SEAWEED)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.infectedCactusPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenInfectedCactus(), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.deadBushPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenDeadBush(), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.infectedFernPerChunk; ++i) {
        DecorateHelper.generatePlants(biome.getRandomWorldGenForGrass(rand), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.greenVeinTallGrassPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenFlowersMP(NibiruBlocks.NIBIRU_TALL_GRASS.getDefaultState().withProperty(BlockNibiruTallGrass.VARIANT, BlockNibiruTallGrass.BlockType.GREEN_VEIN_TALL_GRASS)), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.waterlilyPerChunk; ++i) {
        int x = rand.nextInt(16) + 8;
        int z = rand.nextInt(16) + 8;
        int y = world.getHeight(this.chunkPos.add(x, 0, z)).getY() * 2;
        if (y > 0) {
            int y1 = rand.nextInt(y);
            BlockPos blockpos4;
            BlockPos blockpos7;
            for (blockpos4 = this.chunkPos.add(x, y1, z); blockpos4.getY() > 0; blockpos4 = blockpos7) {
                blockpos7 = blockpos4.down();
                if (!world.isAirBlock(blockpos7)) {
                    break;
                }
            }
            new WorldGenSporelily().generate(world, rand, blockpos4);
        }
    }
    for (i = 0; i < this.clayPerChunk; ++i) {
        int l1 = rand.nextInt(16) + 8;
        int i6 = rand.nextInt(16) + 8;
        new WorldGenNibiruClay(4).generate(world, rand, world.getTopSolidOrLiquidBlock(this.chunkPos.add(l1, 0, i6)));
    }
    for (i = 0; i < this.reedsPerChunk; ++i) {
        DecorateHelper.generatePlants(new WorldGenInfectedSugarCane(), world, rand, this.chunkPos);
    }
    for (i = 0; i < this.sandPatchesPerChunk; ++i) {
        int j = rand.nextInt(16) + 8;
        int k = rand.nextInt(16) + 8;
        new WorldGenNibiruSand(NibiruBlocks.INFECTED_SAND.getDefaultState(), 7).generate(world, rand, world.getTopSolidOrLiquidBlock(this.chunkPos.add(j, 0, k)));
    }
    for (i = 0; i < this.gravelPatchesPerChunk; ++i) {
        int i2 = rand.nextInt(16) + 8;
        int j6 = rand.nextInt(16) + 8;
        new WorldGenNibiruSand(NibiruBlocks.INFECTED_GRAVEL.getDefaultState(), 6).generate(world, rand, world.getTopSolidOrLiquidBlock(this.chunkPos.add(i2, 0, j6)));
    }
    int treesPerChunk = this.infectedTreesPerChunk;
    if (rand.nextInt(10) == 0) {
        ++treesPerChunk;
    }
    for (i = 0; i < treesPerChunk; ++i) {
        int k6 = rand.nextInt(16) + 8;
        int l = rand.nextInt(16) + 8;
        BlockPos blockpos = world.getHeight(this.chunkPos.add(k6, 0, l));
        WorldGenAbstractTree worldgenabstracttree = biome.getRandomTreeFeature(rand);
        if (worldgenabstracttree.generate(world, rand, blockpos)) {
            worldgenabstracttree.generateSaplings(world, rand, blockpos);
        }
    }
    if (rand.nextInt(1000) == 0) {
        int x = rand.nextInt(16) + 8;
        int z = rand.nextInt(16) + 8;
        new WorldGenCrystalObelisk().generate(world, rand, world.getTopSolidOrLiquidBlock(this.chunkPos.add(x, 0, z)));
    }
    if (this.orangeBushPerChunk > 0) {
        int roseBushPerChunk = rand.nextInt(5) - this.orangeBushPerChunk;
        for (i = 0; i < roseBushPerChunk; ++i) {
            for (int i2 = 0; i2 < 5; ++i2) {
                int y = rand.nextInt(world.getHeight(this.chunkPos.add(rand.nextInt(16) + 8, 0, rand.nextInt(16) + 8)).getY() + 32);
                if (new WorldGenNibiruDoublePlant(BlockNibiruDoublePlant.BlockType.INFECTED_ORANGE_ROSE_BUSH).generate(world, rand, new BlockPos(this.chunkPos.getX() + rand.nextInt(16) + 8, y, this.chunkPos.getZ() + rand.nextInt(16) + 8))) {
                    break;
                }
            }
        }
    }
    for (i = 0; i < 4; i++) {
        new WorldGenMultalicCrystal().generate(world, rand, this.chunkPos.add(rand.nextInt(16) + 8, rand.nextInt(36), rand.nextInt(16) + 8));
    }
}
Also used : WorldGenFlowersMP(stevekung.mods.moreplanets.util.world.gen.feature.WorldGenFlowersMP) WorldGenDeadBush(net.minecraft.world.gen.feature.WorldGenDeadBush) WorldGenAbstractTree(net.minecraft.world.gen.feature.WorldGenAbstractTree) BlockPos(net.minecraft.util.math.BlockPos)

Example 3 with WorldGenFlowersMP

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

the class BiomeGreenVein method decorate.

@Override
public void decorate(World world, Random rand, BlockPos pos) {
    double d0 = GRASS_COLOR_NOISE.getValue((pos.getX() + 8) / 200.0D, (pos.getZ() + 8) / 200.0D);
    if (d0 > -0.8D) {
        for (int i = 0; i < 7; ++i) {
            int j = rand.nextInt(16) + 8;
            int k = rand.nextInt(16) + 8;
            int l = rand.nextInt(world.getHeight(pos.add(j, 0, k)).getY() + 32);
            new WorldGenNibiruDoublePlant(BlockNibiruDoublePlant.BlockType.DOUBLE_GREEN_VEIN_GRASS).generate(world, rand, pos.add(j, l, k));
        }
    }
    if (rand.nextInt(15) == 0) {
        int x = rand.nextInt(16) + 8;
        int z = rand.nextInt(16) + 8;
        new WorldGenTerrashroom().generate(world, rand, world.getHeight(pos.add(x, 0, z)));
    }
    if (rand.nextInt(4) == 0) {
        int x = rand.nextInt(16) + 8;
        int z = rand.nextInt(16) + 8;
        BlockPos blockpos2 = world.getHeight(pos.add(x, 0, z));
        new WorldGenFlowersMP(NibiruBlocks.NIBIRU_FLOWER.getDefaultState().withProperty(BlockNibiruFlower.VARIANT, BlockNibiruFlower.BlockType.TERRASHROOM)).generate(world, rand, blockpos2);
    }
    super.decorate(world, rand, pos);
}
Also used : WorldGenTerrashroom(stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenTerrashroom) WorldGenFlowersMP(stevekung.mods.moreplanets.util.world.gen.feature.WorldGenFlowersMP) WorldGenNibiruDoublePlant(stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenNibiruDoublePlant) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

WorldGenFlowersMP (stevekung.mods.moreplanets.util.world.gen.feature.WorldGenFlowersMP)3 BlockPos (net.minecraft.util.math.BlockPos)2 WorldGenAbstractTree (net.minecraft.world.gen.feature.WorldGenAbstractTree)1 WorldGenDeadBush (net.minecraft.world.gen.feature.WorldGenDeadBush)1 WorldGenCheeseSporeTree (stevekung.mods.moreplanets.module.planets.chalos.world.gen.feature.WorldGenCheeseSporeTree)1 WorldGenNibiruDoublePlant (stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenNibiruDoublePlant)1 WorldGenTerrashroom (stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenTerrashroom)1