geforkt von Mirrors/FastAsyncWorldEdit
stop bottling clipboard sizes for no reason
Dieser Commit ist enthalten in:
Ursprung
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();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren