Fix cuboid wall creation

Fixes #341
This commit is contained in:
BrodyBeckwith 2020-02-29 18:52:50 -05:00
parent 0bf0848758
commit 29cd844fb1
No known key found for this signature in database
GPG Key ID: 52A305DF3E7CBE06

View File

@ -1315,9 +1315,11 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
checkNotNull(region); checkNotNull(region);
checkNotNull(pattern); checkNotNull(pattern);
CuboidRegion cuboid = CuboidRegion.makeCuboid(region); int blocksChanged = 0;
Region faces = cuboid.getWalls(); for (Region wall : CuboidRegion.makeCuboid(region).getWalls().getRegions()) {
return setBlocks(faces, pattern); blocksChanged += setBlocks(wall, pattern);
}
return blocksChanged;
} }
/** /**