From c98f6e4f37e256133bdee5179cb1c319d8c2c203 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 16 Jul 2021 10:44:52 +0100 Subject: [PATCH] Do not allow generation commands to generate outside selection --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index dbbd45928..8cac29d14 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -34,6 +34,7 @@ import com.fastasyncworldedit.core.object.collection.LocalBlockVectorSet; import com.fastasyncworldedit.core.object.extent.FaweRegionExtent; import com.fastasyncworldedit.core.object.extent.ProcessedWEExtent; import com.fastasyncworldedit.core.object.extent.ResettableExtent; +import com.fastasyncworldedit.core.object.extent.SingleRegionExtent; import com.fastasyncworldedit.core.object.extent.SourceMaskExtent; import com.fastasyncworldedit.core.object.function.SurfaceRegionFunction; import com.fastasyncworldedit.core.object.mask.ResettableMask; @@ -3277,7 +3278,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { @Override public void generate(Region region, GenBase gen) throws WorldEditException { for (BlockVector2 chunkPos : region.getChunks()) { - gen.generate(chunkPos, this); + gen.generate(chunkPos, new SingleRegionExtent(this, getLimit(), region)); } }