9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-30 04:09:09 +00:00

Fix block change tracker causing a crash when chunks are reloaded

This commit is contained in:
Samsuik
2025-05-29 21:00:59 +01:00
parent 1d4877f84e
commit 2965eb547a

View File

@@ -78,7 +78,7 @@ public final class BlockChangeTracker {
}
public List<Listener> getListenersForChunk(ChunkPos chunkPos) {
return this.chunkListeners.getOrDefault(chunkPos.toLong(), Collections.emptyList());
return List.copyOf(this.chunkListeners.getOrDefault(chunkPos.toLong(), Collections.emptyList()));
}
private static Set<ChunkPos> getChunkPositions(Set<BlockPos> positions) {