mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
stop bottling clipboard sizes for no reason
This commit is contained in:
parent
71059505d1
commit
df48b7e81d
@ -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<ClipboardEntity> entities = new HashSet<>();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user