Merge pull request #349 from BrodyBeckwith/walls

Fix cuboid wall creation
This commit is contained in:
Josh Knight 2020-03-02 17:06:40 -05:00 committed by GitHub
commit f3aa8c5b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1343,9 +1343,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;
}
/**