Search in sources :

Example 1 with WorldGenJungleCacti

use of rtg.api.world.gen.feature.WorldGenJungleCacti in project Realistic-Terrain-Generation by Team-RTG.

the class DecoJungleCacti method generate.

@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), CACTUS)) {
            WorldGenerator worldGenerator = new WorldGenJungleCacti(this.sandOnly, rand.nextInt(this.extraHeight), this.sandMeta);
            for (int i = 0; i < this.strengthFactor * strength; i++) {
                // + 8;
                int intX = worldX + rand.nextInt(16);
                int intY = rand.nextInt(160);
                // + 8;
                int intZ = worldZ + rand.nextInt(16);
                if (intY < this.maxY) {
                    worldGenerator.generate(rtgWorld.world, rand, new BlockPos(intX, intY, intZ));
                }
            }
        }
    }
}
Also used : WorldGenerator(net.minecraft.world.gen.feature.WorldGenerator) WorldGenJungleCacti(rtg.api.world.gen.feature.WorldGenJungleCacti) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

BlockPos (net.minecraft.util.math.BlockPos)1 WorldGenerator (net.minecraft.world.gen.feature.WorldGenerator)1 WorldGenJungleCacti (rtg.api.world.gen.feature.WorldGenJungleCacti)1