diff options
-rw-r--r-- | Spigot-Server-Patches/0448-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0448-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0448-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch new file mode 100644 index 0000000000..8218f3121a --- /dev/null +++ b/Spigot-Server-Patches/0448-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -0,0 +1,42 @@ +From 367bda02eaf6224a01907134e04c87b4230aca33 Mon Sep 17 00:00:00 2001 +From: Paul Sauve <[email protected]> +Date: Sun, 14 Jul 2019 21:05:03 -0500 +Subject: [PATCH] Do less work if we have a custom Bukkit generator + +Patch originally for Paper 1.14 from Paul Sauve <[email protected]> + +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index ee071ba2..8af54019 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -769,12 +769,6 @@ public class WorldServer extends World implements IAsyncTaskHandler { + } else if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) { + this.worldData.setSpawn(BlockPosition.ZERO.up()); + } else { +- WorldChunkManager worldchunkmanager = this.chunkProvider.getChunkGenerator().getWorldChunkManager(); +- List<BiomeBase> list = worldchunkmanager.a(); +- Random random = new Random(this.getSeed()); +- BlockPosition blockposition = worldchunkmanager.a(0, 0, 256, list, random); +- ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); +- + // CraftBukkit start + if (this.generator != null) { + Random rand = new Random(this.getSeed()); +@@ -791,6 +785,14 @@ public class WorldServer extends World implements IAsyncTaskHandler { + } + // CraftBukkit end + ++ // Paper start - this is useless if craftbukkit returns early ++ WorldChunkManager worldchunkmanager = this.chunkProvider.getChunkGenerator().getWorldChunkManager(); ++ List<BiomeBase> list = worldchunkmanager.a(); ++ Random random = new Random(this.getSeed()); ++ BlockPosition blockposition = worldchunkmanager.a(0, 0, 256, list, random); ++ ChunkCoordIntPair chunkcoordintpair = blockposition == null ? new ChunkCoordIntPair(0, 0) : new ChunkCoordIntPair(blockposition); ++ // Paper end ++ + if (blockposition == null) { + WorldServer.a.warn("Unable to find spawn biome"); + } +-- +2.17.1 + |