9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-20 15:39:22 +00:00

Update BukkitWorldManager.java

This commit is contained in:
XiaoMoMi
2025-12-08 04:30:29 +08:00
parent 6e8515c3a7
commit 0d42069a1a

View File

@@ -295,6 +295,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
Object chunkSource = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(worldServer);
Object levelChunk = FastNMS.INSTANCE.method$ServerChunkCache$getChunkAtIfLoadedMainThread(chunkSource, chunk.getX(), chunk.getZ());
Object[] sections = FastNMS.INSTANCE.method$ChunkAccess$getSections(levelChunk);
synchronized (sections) {
for (int i = 0; i < ceSections.length; i++) {
CESection ceSection = ceSections[i];
Object section = sections[i];
@@ -318,6 +319,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
}
}
}
}
if (unsaved /*&& !FastNMS.INSTANCE.method$LevelChunk$isUnsaved(levelChunk)*/) {
FastNMS.INSTANCE.method$LevelChunk$markUnsaved(levelChunk);
}