Fix: Copy-Paste-Brush with falsy mask (#2899)

* fix: don't attempt to load all possible world chunks when copy pasta brush empty clipboard

* chore: move check into ResizableClipboardBuilder
This commit is contained in:
Pierre Maurice Schwang 2024-08-29 07:18:11 +02:00 committed by GitHub
parent 75fb1cbee7
commit f5f9ae6a85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,9 @@ public class ResizableClipboardBuilder extends MemoryOptimizedHistory {
} }
public Clipboard build() { public Clipboard build() {
if (longSize() == 0) {
return EmptyClipboard.getInstance();
}
BlockVector3 pos1 = BlockVector3.at(minX, minY, minZ); BlockVector3 pos1 = BlockVector3.at(minX, minY, minZ);
BlockVector3 pos2 = BlockVector3.at(maxX, maxY, maxZ); BlockVector3 pos2 = BlockVector3.at(maxX, maxY, maxZ);
CuboidRegion region = new CuboidRegion(pos1, pos2); CuboidRegion region = new CuboidRegion(pos1, pos2);