From 1f02287caaefce8e20b0e087f6f007d551432ffc Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sat, 3 Oct 2020 15:53:49 +0100 Subject: [PATCH] trim get where chunk SET is remembered from a previous session --- .../fawe/beta/implementation/chunk/ChunkHolder.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/chunk/ChunkHolder.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/chunk/ChunkHolder.java index d0cde6de2..50db1eb2f 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/chunk/ChunkHolder.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/chunk/ChunkHolder.java @@ -389,6 +389,7 @@ public class ChunkHolder> implements IQueueChunk { public IChunkGet get(ChunkHolder chunk) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.chunkExisting; } @@ -446,6 +447,7 @@ public class ChunkHolder> implements IQueueChunk { public BiomeType getBiome(ChunkHolder chunk, int x, int y, int z) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getBiomeType(x, y, z); } @@ -453,6 +455,7 @@ public class ChunkHolder> implements IQueueChunk { public BlockState getBlock(ChunkHolder chunk, int x, int y, int z) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getBlock(x, y, z); } @@ -461,6 +464,7 @@ public class ChunkHolder> implements IQueueChunk { int z) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getFullBlock(x, y, z); } @@ -477,6 +481,7 @@ public class ChunkHolder> implements IQueueChunk { } chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getSkyLight(x, y, z); } @@ -493,6 +498,7 @@ public class ChunkHolder> implements IQueueChunk { } chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getEmmittedLight(x, y, z); } @@ -500,6 +506,7 @@ public class ChunkHolder> implements IQueueChunk { public int getBrightness(ChunkHolder chunk, int x, int y, int z) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getBrightness(x, y, z); } @@ -507,12 +514,14 @@ public class ChunkHolder> implements IQueueChunk { public int getOpacity(ChunkHolder chunk, int x, int y, int z) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getOpacity(x, y, z); } @Override public int[] getHeightMap(ChunkHolder chunk, HeightMapType type) { chunk.getOrCreateGet(); chunk.delegate = BOTH; + chunk.chunkExisting.trim(false); return chunk.getHeightMap(type); } };