9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-06 15:52:03 +00:00

修复注入时机

This commit is contained in:
jhqwqmc
2026-01-02 19:54:51 +08:00
parent 7cd7504c6c
commit e3d4c95019

View File

@@ -150,7 +150,6 @@ public class BukkitWorldManager implements WorldManager, Listener {
this.worlds.put(uuid, ceWorld);
this.resetWorldArray();
this.injectChunkGenerator(ceWorld);
injectWorldCallback(ceWorld.world.serverWorld());
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
@@ -208,6 +207,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
private void injectChunkGenerator(CEWorld world) {
Object serverLevel = world.world.serverWorld();
injectWorldCallback(serverLevel);
Object serverChunkCache = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(serverLevel);
Object chunkMap = FastNMS.INSTANCE.field$ServerChunkCache$chunkMap(serverChunkCache);
FastNMS.INSTANCE.injectedWorldGen(world, chunkMap);