FlatRegionApplicator -> FlatRegionVisitor.

This commit is contained in:
sk89q 2014-03-26 15:46:46 -07:00 committed by TomyLobo
parent d18a20dafa
commit 7c4a67d32b
3 changed files with 8 additions and 8 deletions

View File

@ -29,12 +29,12 @@ import com.sk89q.worldedit.expression.ExpressionException;
import com.sk89q.worldedit.expression.runtime.RValue;
import com.sk89q.worldedit.generator.ForestGenerator;
import com.sk89q.worldedit.generator.GardenPatchGenerator;
import com.sk89q.worldedit.operation.FlatRegionVisitor;
import com.sk89q.worldedit.operation.GroundScatterFunction;
import com.sk89q.worldedit.interpolation.Interpolation;
import com.sk89q.worldedit.interpolation.KochanekBartelsInterpolation;
import com.sk89q.worldedit.interpolation.Node;
import com.sk89q.worldedit.masks.Mask;
import com.sk89q.worldedit.operation.FlatRegionApplicator;
import com.sk89q.worldedit.operation.OperationHelper;
import com.sk89q.worldedit.patterns.Pattern;
import com.sk89q.worldedit.regions.CuboidRegion;
@ -2591,7 +2591,7 @@ public class EditSession {
scatter.setRange(region);
// Generate those patches!
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
OperationHelper.completeLegacy(operation);
return operation.getAffected();
@ -2654,7 +2654,7 @@ public class EditSession {
* @return number of trees created
* @throws MaxChangedBlocksException
* @deprecated Use {@link com.sk89q.worldedit.generator.ForestGenerator} with a
* {@link com.sk89q.worldedit.operation.FlatRegionApplicator}
* {@link com.sk89q.worldedit.operation.FlatRegionVisitor}
*/
@Deprecated
public int makeForest(Iterable<Vector2D> it, int upperY, int lowerY,

View File

@ -31,9 +31,9 @@ import com.sk89q.worldedit.filtering.GaussianKernel;
import com.sk89q.worldedit.filtering.HeightMapFilter;
import com.sk89q.worldedit.generator.FloraGenerator;
import com.sk89q.worldedit.generator.ForestGenerator;
import com.sk89q.worldedit.operation.FlatRegionVisitor;
import com.sk89q.worldedit.operation.GroundScatterFunction;
import com.sk89q.worldedit.masks.Mask;
import com.sk89q.worldedit.operation.FlatRegionApplicator;
import com.sk89q.worldedit.operation.OperationHelper;
import com.sk89q.worldedit.patterns.Pattern;
import com.sk89q.worldedit.patterns.SingleBlockPattern;
@ -552,7 +552,7 @@ public class RegionCommands {
scatter.setRange(region);
// Generate that forest
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
OperationHelper.complete(operation);
player.print(operation.getAffected() + " trees created.");
@ -581,7 +581,7 @@ public class RegionCommands {
scatter.setRange(region);
// Generate that flora
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
OperationHelper.complete(operation);
player.print(operation.getAffected() + " flora created.");

View File

@ -28,13 +28,13 @@ import com.sk89q.worldedit.regions.Region;
/**
* Utility class to apply region functions to {@link com.sk89q.worldedit.regions.Region}.
*/
public class FlatRegionApplicator implements Operation {
public class FlatRegionVisitor implements Operation {
private final FlatRegion flatRegion;
private final FlatRegionFunction function;
private int affected = 0;
public FlatRegionApplicator(Region region, FlatRegionFunction function) {
public FlatRegionVisitor(Region region, FlatRegionFunction function) {
this.function = function;
if (region instanceof FlatRegion) {