Commits

md_5 authored a875ee41605
Fix loading secondary worlds
No tags

nms-patches/MinecraftServer.patch

Modified
344 344 - WorldServer worldserver = this.getWorldServer(DimensionManager.OVERWORLD);
345 345 + // WorldServer worldserver = this.getWorldServer(DimensionManager.OVERWORLD);
346 346 + this.forceTicks = true;
347 347 + // CraftBukkit end
348 348
349 349 - MinecraftServer.LOGGER.info("Preparing start region for dimension " + DimensionManager.a(worldserver.worldProvider.getDimensionManager()));
350 350 + MinecraftServer.LOGGER.info("Preparing start region for dimension '{}'/{}", worldserver.getWorldData().getName(), DimensionManager.a(worldserver.worldProvider.getDimensionManager())); // CraftBukkit
351 351 BlockPosition blockposition = worldserver.getSpawn();
352 352
353 353 worldloadlistener.a(new ChunkCoordIntPair(blockposition));
354 -@@ -379,16 +543,20 @@
354 +@@ -379,17 +543,21 @@
355 355 chunkproviderserver.addTicket(TicketType.START, new ChunkCoordIntPair(blockposition), 11, Unit.INSTANCE);
356 356
357 357 while (chunkproviderserver.b() != 441) {
358 358 - this.nextTick += 100L;
359 359 - this.sleepForTick();
360 360 + // CraftBukkit start
361 361 + // this.nextTick += 100L;
362 362 + this.executeModerately();
363 363 + // CraftBukkit end
364 364 }
365 365
366 366 - this.nextTick += 100L;
367 367 - this.sleepForTick();
368 368 - Iterator iterator = DimensionManager.a().iterator();
369 369 -
370 370 - while (iterator.hasNext()) {
371 371 - DimensionManager dimensionmanager = (DimensionManager) iterator.next();
372 +- ForcedChunk forcedchunk = (ForcedChunk) this.getWorldServer(dimensionmanager).getWorldPersistentData().b(ForcedChunk::new, "chunks");
372 373 + // CraftBukkit start
373 374 + // this.nextTick += 100L;
374 375 + this.executeModerately();
375 376 + // Iterator iterator = DimensionManager.a().iterator();
376 377 +
377 378 + if (true) {
378 379 + DimensionManager dimensionmanager = worldserver.worldProvider.getDimensionManager();
380 ++ ForcedChunk forcedchunk = (ForcedChunk) worldserver.getWorldPersistentData().b(ForcedChunk::new, "chunks");
379 381 + // CraftBukkit end
380 - ForcedChunk forcedchunk = (ForcedChunk) this.getWorldServer(dimensionmanager).getWorldPersistentData().b(ForcedChunk::new, "chunks");
381 382
382 383 if (forcedchunk != null) {
384 + WorldServer worldserver1 = this.getWorldServer(dimensionmanager);
383 385 @@ -404,10 +572,17 @@
384 386 }
385 387 }
386 388
387 389 - this.nextTick += 100L;
388 390 - this.sleepForTick();
389 391 + // CraftBukkit start
390 392 + // this.nextTick += 100L;
391 393 + this.executeModerately();
392 394 + // CraftBukkit end

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut