use of rtg.api.world.gen.feature.WorldGenVinesRTG in project Realistic-Terrain-Generation by Team-RTG.
the class DecoVines 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), GRASS)) {
this.worldGenerator = new WorldGenVinesRTG(this.vineBlock, this.maxY, this.propNorth, this.propEast, this.propSouth, this.propWest);
this.setLoops((this.strengthFactor > 0f) ? (int) (this.strengthFactor * strength) : this.loops);
for (int i = 0; i < this.loops; i++) {
// + 8;
int intX = worldX + rand.nextInt(16);
// + 8;
int intZ = worldZ + rand.nextInt(16);
int intY = this.minY;
worldGenerator.generate(rtgWorld.world, rand, new BlockPos(intX, intY, intZ));
}
}
}
}
use of rtg.api.world.gen.feature.WorldGenVinesRTG 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));
}
}
}
}
}
Aggregations