Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 16:12:51 +02:00
add biomes, and do it all at once using a clipboard. Crude, but eh
Dieser Commit ist enthalten in:
Ursprung
11373c865a
Commit
d92cded832
@ -16,6 +16,8 @@ import com.sk89q.worldedit.EditSession;
|
|||||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
|
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
|
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
|
||||||
import com.sk89q.worldedit.function.FlatRegionFunction;
|
import com.sk89q.worldedit.function.FlatRegionFunction;
|
||||||
@ -24,6 +26,7 @@ import com.sk89q.worldedit.function.operation.ForwardExtentCopy;
|
|||||||
import com.sk89q.worldedit.function.operation.Operations;
|
import com.sk89q.worldedit.function.operation.Operations;
|
||||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||||
import com.sk89q.worldedit.function.visitor.FlatRegionVisitor;
|
import com.sk89q.worldedit.function.visitor.FlatRegionVisitor;
|
||||||
|
import com.sk89q.worldedit.math.BlockVector2;
|
||||||
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;
|
||||||
@ -108,6 +111,7 @@ public class FaweRegionManager extends RegionManager {
|
|||||||
|
|
||||||
final Pattern filling = hybridPlotWorld.MAIN_BLOCK.toPattern();
|
final Pattern filling = hybridPlotWorld.MAIN_BLOCK.toPattern();
|
||||||
final Pattern plotfloor = hybridPlotWorld.TOP_BLOCK.toPattern();
|
final Pattern plotfloor = hybridPlotWorld.TOP_BLOCK.toPattern();
|
||||||
|
final BiomeType biome = hybridPlotWorld.getPlotBiome();
|
||||||
|
|
||||||
BlockVector3 pos1 = plot.getBottomAbs().getBlockVector3();
|
BlockVector3 pos1 = plot.getBottomAbs().getBlockVector3();
|
||||||
BlockVector3 pos2 = plot.getExtendedTopAbs().getBlockVector3();
|
BlockVector3 pos2 = plot.getExtendedTopAbs().getBlockVector3();
|
||||||
@ -119,10 +123,19 @@ public class FaweRegionManager extends RegionManager {
|
|||||||
Region airRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT + 1),
|
Region airRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT + 1),
|
||||||
pos2.withY(manager.getWorldHeight()));
|
pos2.withY(manager.getWorldHeight()));
|
||||||
|
|
||||||
editSession.setBlocks(bedrockRegion, bedrock);
|
Clipboard clipboard = new BlockArrayClipboard(new CuboidRegion(pos1, pos2));
|
||||||
editSession.setBlocks(fillingRegion, filling);
|
|
||||||
editSession.setBlocks(floorRegion, plotfloor);
|
clipboard.setBlocks(bedrockRegion, bedrock);
|
||||||
editSession.setBlocks(airRegion, air);
|
clipboard.setBlocks(fillingRegion, filling);
|
||||||
|
clipboard.setBlocks(floorRegion, plotfloor);
|
||||||
|
clipboard.setBlocks(airRegion, air);
|
||||||
|
for (int x = pos1.getX(); x <= pos2.getX(); x ++) {
|
||||||
|
for (int z = pos1.getX(); z <= pos2.getX(); z ++) {
|
||||||
|
clipboard.setBiome(BlockVector2.at(x, z), biome);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clipboard.paste(editSession, pos1, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hybridPlotWorld.PLOT_SCHEMATIC) {
|
if (hybridPlotWorld.PLOT_SCHEMATIC) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren