From df48b7e81d0aab836e4d5c604867c787ad2b284b Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 31 Dec 2020 15:01:54 +0000 Subject: [PATCH] stop bottling clipboard sizes for no reason --- .../com/boydti/fawe/object/clipboard/LinearClipboard.java | 4 ---- .../com/boydti/fawe/object/clipboard/SimpleClipboard.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/LinearClipboard.java b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/LinearClipboard.java index 962a73695..0be9cffcc 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/LinearClipboard.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/LinearClipboard.java @@ -21,10 +21,6 @@ import java.util.HashSet; import java.util.Iterator; import java.util.UUID; -/** - * Best used when clipboard selections are small, or using legacy formats - * (Small being < Integer.MAX_VALUE/BLOCK_SIZE_BYTES blocks) - */ public abstract class LinearClipboard extends SimpleClipboard { protected final HashSet entities = new HashSet<>(); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/SimpleClipboard.java b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/SimpleClipboard.java index 06b250567..8317860b9 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/SimpleClipboard.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/SimpleClipboard.java @@ -14,7 +14,7 @@ public abstract class SimpleClipboard implements Clipboard { SimpleClipboard(BlockVector3 dimensions) { this.size = dimensions; long longVolume = (long) getWidth() * (long) getHeight() * (long) getLength(); - if (longVolume >= Integer.MAX_VALUE >> 2) { + if (longVolume >= Integer.MAX_VALUE) { throw new IllegalArgumentException("Dimensions are too large for this clipboard format."); } this.area = getWidth() * getLength();