Fix clipboards to allow proper heights by allowing extended CuboidRegion heights (#1624)

* Fix clipboards to allow proper heights by allowing extended CuboidRegion heights
Fixes #1534

* Add @since

* Fix javadoc comment

Co-authored-by: Alex <mc.cache@web.de>
This commit is contained in:
Jordan
2022-02-24 10:32:45 +01:00
committed by GitHub
parent 0a04b0b4cd
commit 28a0239437
9 changed files with 98 additions and 47 deletions

View File

@ -340,8 +340,7 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable, Fl
copy.setTransform(transform);
}
copy.setCopyingBiomes(this.hasBiomes());
if (extent instanceof EditSession) {
EditSession editSession = (EditSession) extent;
if (extent instanceof EditSession editSession) {
Mask sourceMask = editSession.getSourceMask();
if (sourceMask != null) {
new MaskTraverser(sourceMask).reset(extent);
@ -393,7 +392,7 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable, Fl
continue;
}
if (pos.getY() < extent.getMinY()) {
throw new RuntimeException("Y-Position cannot be less than 0!");
throw new RuntimeException("Y-Position cannot be less than the extent's minimum Y!");
}
extent.setBlock(xx, yy, zz, block);
}