use of rtg.api.world.gen.feature.WorldGenBlock in project Realistic-Terrain-Generation by Team-RTG.
the class DecoCobwebs 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) {
WorldGenerator worldGenerator = new WorldGenBlock(Blocks.WEB.getDefaultState(), Blocks.AIR.getDefaultState(), this.adjacentBlock, this.minAdjacents);
for (int l1 = 0; l1 < this.strengthFactor * strength; ++l1) {
// + 8;
int i1 = worldX + rand.nextInt(16);
// + 8;
int j1 = worldZ + rand.nextInt(16);
int k1 = RandomUtil.getRandomInt(rand, this.minY, this.maxY);
if (rand.nextInt(this.chance) == 0) {
worldGenerator.generate(rtgWorld.world, rand, new BlockPos(i1, k1, j1));
}
}
}
}
Aggregations