mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Made GroundScatterFunction use a NoiseGenerator.
This commit is contained in:
@ -2662,12 +2662,16 @@ public class EditSession {
|
||||
throws WorldEditException {
|
||||
|
||||
ForestGenerator generator = new ForestGenerator(this, treeGenerator);
|
||||
generator.setRange(lowerY, upperY);
|
||||
generator.setDensity(density);
|
||||
|
||||
// And we want to scatter them
|
||||
GroundScatterFunction scatter = new GroundScatterFunction(this, generator);
|
||||
scatter.setDensity(density);
|
||||
scatter.setRange(lowerY, upperY);
|
||||
|
||||
int affected = 0;
|
||||
|
||||
for (Vector2D pt : it) {
|
||||
if (generator.apply(pt)) {
|
||||
if (scatter.apply(pt)) {
|
||||
affected++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user