Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

Commit 2303491

Browse files
author
KrystilizeNevaDies
committed
synchronise loadChunk
1 parent c50b58d commit 2303491

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/net/crystalgames/scaffolding/instance/SchematicChunkLoader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private SchematicChunkLoader(
6464
}
6565

6666
@Override
67-
public @NotNull CompletableFuture<@Nullable Chunk> loadChunk(@NotNull Instance instance, int chunkX, int chunkZ) {
67+
public synchronized @NotNull CompletableFuture<@Nullable Chunk> loadChunk(@NotNull Instance instance, int chunkX, int chunkZ) {
6868
long index = ChunkUtils.getChunkIndex(chunkX, chunkZ);
6969
ChunkBatch batch = batches.get(index);
7070

@@ -139,5 +139,4 @@ private Builder() {
139139
return new SchematicChunkLoader(handler, List.copyOf(schematics), xOffset, yOffset, zOffset);
140140
}
141141
}
142-
143142
}

0 commit comments

Comments
 (0)