From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Paul Sauve Date: Sun, 14 Jul 2019 21:05:03 -0500 Subject: [PATCH] Do less work if we have a custom Bukkit generator If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 0633944364179ffb9b9fdd0400d82fd5b2ab3892..41c4b2df34faa95afdd2d35b0bac021d77c56884 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -512,11 +512,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = worldchunkmanager.b(); - Random random = new Random(worldserver.getSeed()); - BlockPosition blockposition = worldchunkmanager.a(0, worldserver.getSeaLevel(), 0, 256, list, random); - ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); + // Paper start - moved down // CraftBukkit start if (worldserver.generator != null) { Random rand = new Random(worldserver.getSeed()); @@ -532,6 +528,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant list = worldchunkmanager.b(); + Random random = new Random(worldserver.getSeed()); + BlockPosition blockposition = worldchunkmanager.a(0, worldserver.getSeaLevel(), 0, 256, list, random); + ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); + // Paper end if (blockposition == null) { MinecraftServer.LOGGER.warn("Unable to find spawn biome");