Respect clipboard settings (disk vs memory) when loading a schematic (#1742)

Dieser Commit ist enthalten in:
Jordan 2022-05-14 21:10:13 +01:00 committet von GitHub
Ursprung 1c7643bb58
Commit deaf5ad2d6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -19,9 +19,9 @@
package com.sk89q.worldedit.extent.clipboard.io; package com.sk89q.worldedit.extent.clipboard.io;
import com.fastasyncworldedit.core.extent.clipboard.DiskOptimizedClipboard;
import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
@ -59,7 +59,10 @@ public interface ClipboardReader extends Closeable {
//FAWE start //FAWE start
default Clipboard read(UUID uuid) throws IOException { default Clipboard read(UUID uuid) throws IOException {
return read(uuid, DiskOptimizedClipboard::new); return read(
uuid,
(dimensions) -> Clipboard.create(new CuboidRegion(BlockVector3.ZERO, dimensions.subtract(BlockVector3.ONE)), uuid)
);
} }
default Clipboard read(UUID uuid, Function<BlockVector3, Clipboard> createOutput) throws IOException { default Clipboard read(UUID uuid, Function<BlockVector3, Clipboard> createOutput) throws IOException {