3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-09-16 04:51:22 +02:00

stop bottling clipboard sizes for no reason

Dieser Commit ist enthalten in:
dordsor21 2020-12-31 15:01:54 +00:00
Ursprung 71059505d1
Commit df48b7e81d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -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<>();

Datei anzeigen

@ -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();