Search in sources :

Example 1 with WorldGenTerrashroom

use of stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenTerrashroom 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)

Example 2 with WorldGenTerrashroom

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

the class BlockNibiruFlower method generateBigMushroom.

private boolean generateBigMushroom(World world, BlockPos pos, IBlockState state, Random rand) {
    world.setBlockToAir(pos);
    WorldGenerator worldgenerator = new WorldGenTerrashroom();
    if (worldgenerator.generate(world, rand, pos)) {
        return true;
    } else {
        world.setBlockState(pos, state, 3);
        return false;
    }
}
Also used : WorldGenTerrashroom(stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenTerrashroom) WorldGenerator(net.minecraft.world.gen.feature.WorldGenerator)

Aggregations

WorldGenTerrashroom (stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenTerrashroom)2 BlockPos (net.minecraft.util.math.BlockPos)1 WorldGenerator (net.minecraft.world.gen.feature.WorldGenerator)1 WorldGenNibiruDoublePlant (stevekung.mods.moreplanets.module.planets.nibiru.world.gen.feature.WorldGenNibiruDoublePlant)1 WorldGenFlowersMP (stevekung.mods.moreplanets.util.world.gen.feature.WorldGenFlowersMP)1