From 59897dea119a4498449783e12821df73b058a34a Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 10 Nov 2019 14:19:36 +0000 Subject: [PATCH] Update MCAFile.java --- .../src/main/java/com/boydti/fawe/jnbt/anvil/MCAFile.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAFile.java b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAFile.java index 92614b6e5..cb87a0575 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAFile.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAFile.java @@ -601,6 +601,7 @@ public class MCAFile extends ExtentBatchProcessorHolder implements Trimable, ICh end = Math.min(start + size, end); int pair = getIndex(cx, cz); + Future future = null; byte[] newBytes = relocate.get(pair); int newBytesLength = 0; @@ -623,9 +624,13 @@ public class MCAFile extends ExtentBatchProcessorHolder implements Trimable, ICh if (future == null) { if (cached == null || !cached.isDeleted()) { FastByteArrayInputStream result = getChunkCompressedBytes(getOffset(cx, cz)); + newBytes = result.array; + newBytesLength = result.length; } } } + } else { + newBytesLength = newBytes.length; } if (future != null) { newBytes = future.get();