From e2b1313f00b416126b0c64513d4b7a03b29508ed Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 1 Feb 2022 08:13:13 +1100 Subject: [PATCH] #1004: Call WorldInitEvent before any chunks are generated By: DerFrZocker --- .../net/minecraft/server/MinecraftServer.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/paper-server/nms-patches/net/minecraft/server/MinecraftServer.patch b/paper-server/nms-patches/net/minecraft/server/MinecraftServer.patch index cd4df73844..b2ffda4c1a 100644 --- a/paper-server/nms-patches/net/minecraft/server/MinecraftServer.patch +++ b/paper-server/nms-patches/net/minecraft/server/MinecraftServer.patch @@ -143,7 +143,7 @@ if (profiledduration != null) { profiledduration.finish(); } -@@ -358,35 +417,203 @@ +@@ -358,36 +417,206 @@ } @@ -369,9 +369,12 @@ + worldserver.getWorld().getPopulators().addAll(worldserver.generator.getDefaultPopulators(worldserver.getWorld())); + } WorldBorder worldborder = worldserver.getWorldBorder(); ++ worldborder.applySettings(iworlddataserver.getWorldBorder()); // CraftBukkit - move up so that WorldBorder is set during WorldInitEvent ++ this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldInitEvent(worldserver.getWorld())); // CraftBukkit - SPIGOT-5569: Call WorldInitEvent before any chunks are generated if (!iworlddataserver.isInitialized()) { -@@ -411,31 +638,10 @@ + try { +@@ -411,31 +640,8 @@ iworlddataserver.setInitialized(true); } @@ -398,8 +401,7 @@ - } - } - - worldborder.applySettings(iworlddataserver.getWorldBorder()); -+ this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldInitEvent(worldserver.getWorld())); // CraftBukkit - SPIGOT-5569 +- worldborder.applySettings(iworlddataserver.getWorldBorder()); } + // CraftBukkit end