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));
}
}
}
}
}
Aggregations