From 29cd844fb17b46e73a6218db10f5bdb67d591c3e Mon Sep 17 00:00:00 2001 From: BrodyBeckwith Date: Sat, 29 Feb 2020 18:52:50 -0500 Subject: [PATCH] Fix cuboid wall creation Fixes #341 --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 4e4e9f333..5c1743138 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1315,9 +1315,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { checkNotNull(region); checkNotNull(pattern); - CuboidRegion cuboid = CuboidRegion.makeCuboid(region); - Region faces = cuboid.getWalls(); - return setBlocks(faces, pattern); + int blocksChanged = 0; + for (Region wall : CuboidRegion.makeCuboid(region).getWalls().getRegions()) { + blocksChanged += setBlocks(wall, pattern); + } + return blocksChanged; } /**