Search in sources :

Example 1 with WorldGenWaterlily

use of net.minecraft.world.gen.feature.WorldGenWaterlily in project Realistic-Terrain-Generation by Team-RTG.

the class DecoJungleLilypadVines method generate.

/**
     * No config options for this one yet. Just ripped it directly from the old code.
     */
@Override
public void generate(IRealisticBiome biome, RTGWorld rtgWorld, Random rand, int worldX, int worldZ, float strength, float river, boolean hasPlacedVillageBlocks) {
    if (this.allowed) {
        if (TerrainGen.decorate(rtgWorld.world, rand, new BlockPos(worldX, 0, worldZ), LILYPAD)) {
            WorldGenerator worldgeneratorLilypads = new WorldGenWaterlily();
            WorldGenerator worldgeneratorVines = new WorldGenVinesRTG();
            Block vb;
            for (int b33 = 0; b33 < 5; b33++) {
                int j6 = worldX + rand.nextInt(16) + 8;
                int k10 = worldZ + rand.nextInt(16) + 8;
                int z52 = rtgWorld.world.getHeight(new BlockPos(j6, 0, k10)).getY();
                for (int h44 = 0; h44 < 8; h44++) {
                    if (z52 > 64) {
                        worldgeneratorLilypads.generate(rtgWorld.world, rand, new BlockPos(j6, z52, k10));
                    }
                }
                for (int h44 = 100; h44 > 0; h44--) {
                    worldgeneratorVines.generate(rtgWorld.world, rand, new BlockPos(j6, z52, k10));
                }
            }
        }
    }
}
Also used : WorldGenerator(net.minecraft.world.gen.feature.WorldGenerator) WorldGenWaterlily(net.minecraft.world.gen.feature.WorldGenWaterlily) Block(net.minecraft.block.Block) BlockPos(net.minecraft.util.math.BlockPos) WorldGenVinesRTG(rtg.api.world.gen.feature.WorldGenVinesRTG)

Aggregations

Block (net.minecraft.block.Block)1 BlockPos (net.minecraft.util.math.BlockPos)1 WorldGenWaterlily (net.minecraft.world.gen.feature.WorldGenWaterlily)1 WorldGenerator (net.minecraft.world.gen.feature.WorldGenerator)1 WorldGenVinesRTG (rtg.api.world.gen.feature.WorldGenVinesRTG)1