3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-02 17:40:09 +01:00

//setbiome should be 3D as well

Dieser Commit ist enthalten in:
dordsor21 2020-12-11 12:55:49 +00:00
Ursprung ff7c972ea6
Commit 3717351d61
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -32,11 +32,14 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extension.platform.Capability; import com.sk89q.worldedit.extension.platform.Capability;
import com.sk89q.worldedit.function.FlatRegionFunction; import com.sk89q.worldedit.function.FlatRegionFunction;
import com.sk89q.worldedit.function.FlatRegionMaskingFilter; import com.sk89q.worldedit.function.FlatRegionMaskingFilter;
import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.RegionMaskingFilter;
import com.sk89q.worldedit.function.biome.BiomeReplace; import com.sk89q.worldedit.function.biome.BiomeReplace;
import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.mask.Mask2D; import com.sk89q.worldedit.function.mask.Mask2D;
import com.sk89q.worldedit.function.operation.Operations; import com.sk89q.worldedit.function.operation.Operations;
import com.sk89q.worldedit.function.visitor.FlatRegionVisitor; import com.sk89q.worldedit.function.visitor.FlatRegionVisitor;
import com.sk89q.worldedit.function.visitor.RegionVisitor;
import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.Region;
@ -167,7 +170,6 @@ public class BiomeCommands {
World world = player.getWorld(); World world = player.getWorld();
Region region; Region region;
Mask mask = editSession.getMask(); Mask mask = editSession.getMask();
Mask2D mask2d = mask != null ? mask.toMask2D() : null;
if (atPosition) { if (atPosition) {
final BlockVector3 pos = player.getLocation().toVector().toBlockPoint(); final BlockVector3 pos = player.getLocation().toVector().toBlockPoint();
@ -176,11 +178,11 @@ public class BiomeCommands {
region = session.getSelection(world); region = session.getSelection(world);
} }
FlatRegionFunction replace = new BiomeReplace(editSession, target); RegionFunction replace = new BiomeReplace(editSession, target);
if (mask2d != null) { if (mask != null) {
replace = new FlatRegionMaskingFilter(mask2d, replace); replace = new RegionMaskingFilter(editSession, mask, replace);
} }
FlatRegionVisitor visitor = new FlatRegionVisitor(Regions.asFlatRegion(region), replace); RegionVisitor visitor = new RegionVisitor(region, replace);
Operations.completeLegacy(visitor); Operations.completeLegacy(visitor);
player.printInfo(TranslatableComponent.of( player.printInfo(TranslatableComponent.of(