Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-27 11:20:04 +01:00
FlatRegionApplicator -> FlatRegionVisitor.
Dieser Commit ist enthalten in:
Ursprung
d18a20dafa
Commit
7c4a67d32b
@ -29,12 +29,12 @@ import com.sk89q.worldedit.expression.ExpressionException;
|
|||||||
import com.sk89q.worldedit.expression.runtime.RValue;
|
import com.sk89q.worldedit.expression.runtime.RValue;
|
||||||
import com.sk89q.worldedit.generator.ForestGenerator;
|
import com.sk89q.worldedit.generator.ForestGenerator;
|
||||||
import com.sk89q.worldedit.generator.GardenPatchGenerator;
|
import com.sk89q.worldedit.generator.GardenPatchGenerator;
|
||||||
|
import com.sk89q.worldedit.operation.FlatRegionVisitor;
|
||||||
import com.sk89q.worldedit.operation.GroundScatterFunction;
|
import com.sk89q.worldedit.operation.GroundScatterFunction;
|
||||||
import com.sk89q.worldedit.interpolation.Interpolation;
|
import com.sk89q.worldedit.interpolation.Interpolation;
|
||||||
import com.sk89q.worldedit.interpolation.KochanekBartelsInterpolation;
|
import com.sk89q.worldedit.interpolation.KochanekBartelsInterpolation;
|
||||||
import com.sk89q.worldedit.interpolation.Node;
|
import com.sk89q.worldedit.interpolation.Node;
|
||||||
import com.sk89q.worldedit.masks.Mask;
|
import com.sk89q.worldedit.masks.Mask;
|
||||||
import com.sk89q.worldedit.operation.FlatRegionApplicator;
|
|
||||||
import com.sk89q.worldedit.operation.OperationHelper;
|
import com.sk89q.worldedit.operation.OperationHelper;
|
||||||
import com.sk89q.worldedit.patterns.Pattern;
|
import com.sk89q.worldedit.patterns.Pattern;
|
||||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||||
@ -2591,7 +2591,7 @@ public class EditSession {
|
|||||||
scatter.setRange(region);
|
scatter.setRange(region);
|
||||||
|
|
||||||
// Generate those patches!
|
// Generate those patches!
|
||||||
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
|
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
|
||||||
OperationHelper.completeLegacy(operation);
|
OperationHelper.completeLegacy(operation);
|
||||||
|
|
||||||
return operation.getAffected();
|
return operation.getAffected();
|
||||||
@ -2654,7 +2654,7 @@ public class EditSession {
|
|||||||
* @return number of trees created
|
* @return number of trees created
|
||||||
* @throws MaxChangedBlocksException
|
* @throws MaxChangedBlocksException
|
||||||
* @deprecated Use {@link com.sk89q.worldedit.generator.ForestGenerator} with a
|
* @deprecated Use {@link com.sk89q.worldedit.generator.ForestGenerator} with a
|
||||||
* {@link com.sk89q.worldedit.operation.FlatRegionApplicator}
|
* {@link com.sk89q.worldedit.operation.FlatRegionVisitor}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public int makeForest(Iterable<Vector2D> it, int upperY, int lowerY,
|
public int makeForest(Iterable<Vector2D> it, int upperY, int lowerY,
|
||||||
|
@ -31,9 +31,9 @@ import com.sk89q.worldedit.filtering.GaussianKernel;
|
|||||||
import com.sk89q.worldedit.filtering.HeightMapFilter;
|
import com.sk89q.worldedit.filtering.HeightMapFilter;
|
||||||
import com.sk89q.worldedit.generator.FloraGenerator;
|
import com.sk89q.worldedit.generator.FloraGenerator;
|
||||||
import com.sk89q.worldedit.generator.ForestGenerator;
|
import com.sk89q.worldedit.generator.ForestGenerator;
|
||||||
|
import com.sk89q.worldedit.operation.FlatRegionVisitor;
|
||||||
import com.sk89q.worldedit.operation.GroundScatterFunction;
|
import com.sk89q.worldedit.operation.GroundScatterFunction;
|
||||||
import com.sk89q.worldedit.masks.Mask;
|
import com.sk89q.worldedit.masks.Mask;
|
||||||
import com.sk89q.worldedit.operation.FlatRegionApplicator;
|
|
||||||
import com.sk89q.worldedit.operation.OperationHelper;
|
import com.sk89q.worldedit.operation.OperationHelper;
|
||||||
import com.sk89q.worldedit.patterns.Pattern;
|
import com.sk89q.worldedit.patterns.Pattern;
|
||||||
import com.sk89q.worldedit.patterns.SingleBlockPattern;
|
import com.sk89q.worldedit.patterns.SingleBlockPattern;
|
||||||
@ -552,7 +552,7 @@ public class RegionCommands {
|
|||||||
scatter.setRange(region);
|
scatter.setRange(region);
|
||||||
|
|
||||||
// Generate that forest
|
// Generate that forest
|
||||||
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
|
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
|
||||||
OperationHelper.complete(operation);
|
OperationHelper.complete(operation);
|
||||||
|
|
||||||
player.print(operation.getAffected() + " trees created.");
|
player.print(operation.getAffected() + " trees created.");
|
||||||
@ -581,7 +581,7 @@ public class RegionCommands {
|
|||||||
scatter.setRange(region);
|
scatter.setRange(region);
|
||||||
|
|
||||||
// Generate that flora
|
// Generate that flora
|
||||||
FlatRegionApplicator operation = new FlatRegionApplicator(region, scatter);
|
FlatRegionVisitor operation = new FlatRegionVisitor(region, scatter);
|
||||||
OperationHelper.complete(operation);
|
OperationHelper.complete(operation);
|
||||||
|
|
||||||
player.print(operation.getAffected() + " flora created.");
|
player.print(operation.getAffected() + " flora created.");
|
||||||
|
@ -28,13 +28,13 @@ import com.sk89q.worldedit.regions.Region;
|
|||||||
/**
|
/**
|
||||||
* Utility class to apply region functions to {@link 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 FlatRegion flatRegion;
|
||||||
private final FlatRegionFunction function;
|
private final FlatRegionFunction function;
|
||||||
private int affected = 0;
|
private int affected = 0;
|
||||||
|
|
||||||
public FlatRegionApplicator(Region region, FlatRegionFunction function) {
|
public FlatRegionVisitor(Region region, FlatRegionFunction function) {
|
||||||
this.function = function;
|
this.function = function;
|
||||||
|
|
||||||
if (region instanceof FlatRegion) {
|
if (region instanceof FlatRegion) {
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren