use of net.minecraft.world.gen.feature.WorldGenDesertWells in project Realistic-Terrain-Generation by Team-RTG.
the class DecoDesertWell 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 WorldGenDesertWells();
this.setLoops((this.strengthFactor > 0f) ? (int) (this.strengthFactor * strength) : this.loops);
for (int i = 0; i < this.loops; i++) {
if (rand.nextInt(this.chance) == 0) {
int intX = worldX + rand.nextInt(16) + 8;
int intY = rand.nextInt(this.maxY);
int intZ = worldZ + rand.nextInt(16) + 8;
if (intY <= this.maxY) {
worldGenerator.generate(rtgWorld.world, rand, new BlockPos(intX, intY, intZ));
}
}
}
}
}
Aggregations