From 5e45fd1625c0a3135e26efaa6fe03f6c6e4a5c34 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 10 Aug 2011 04:16:54 +0200 Subject: [PATCH] Disabling global masks while regnerating because they only affect the area outside the selection. --- .../java/com/sk89q/worldedit/commands/RegionCommands.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java index d5cbd25ea..23cc19f72 100644 --- a/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/RegionCommands.java @@ -30,6 +30,7 @@ import com.sk89q.worldedit.*; import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.filtering.GaussianKernel; import com.sk89q.worldedit.filtering.HeightMapFilter; +import com.sk89q.worldedit.masks.Mask; import com.sk89q.worldedit.patterns.*; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.regions.RegionOperationException; @@ -304,7 +305,10 @@ public class RegionCommands { throws WorldEditException { Region region = session.getSelection(player.getWorld()); + Mask mask = session.getMask(); + session.setMask(null); player.getWorld().regenerate(region, editSession); + session.setMask(mask); player.print("Region regenerated."); } }