Don't allow heightmap-based brushes to edit the entire world "depth" (#1617)

Fixes #1614

Co-authored-by: Alex <mc.cache@web.de>
This commit is contained in:
Jordan 2022-02-24 10:33:37 +01:00 committed by GitHub
parent fc2662e51e
commit b8ab2a5204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ public interface HeightMap {
) throws MaxChangedBlocksException {
BlockVector3 top = session.getMaximumPoint();
int maxY = top.getBlockY();
Location min = new Location(session.getWorld(), pos.subtract(size, maxY, size).toVector3());
Location min = new Location(session.getWorld(), pos.subtract(size, size, size).toVector3());
BlockVector3 max = pos.add(size, maxY, size);
Region region = new CuboidRegion(session.getWorld(), min.toBlockPoint(), max);
com.sk89q.worldedit.math.convolution.HeightMap heightMap = new com.sk89q.worldedit.math.convolution.HeightMap(