From deaf5ad2d6bed06f21ba1e700e1d7fe498bcdd31 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 14 May 2022 21:10:13 +0100 Subject: [PATCH] Respect clipboard settings (disk vs memory) when loading a schematic (#1742) --- .../worldedit/extent/clipboard/io/ClipboardReader.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java index abc5095a8..67096fa94 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardReader.java @@ -19,9 +19,9 @@ 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.math.BlockVector3; +import com.sk89q.worldedit.regions.CuboidRegion; import java.io.Closeable; import java.io.IOException; @@ -59,7 +59,10 @@ public interface ClipboardReader extends Closeable { //FAWE start 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 createOutput) throws IOException {