From 83948f6f5901edf27e83d8aa5bdca10f1eff63d8 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 19 Mar 2023 12:28:28 -0700 Subject: [PATCH] Fire reload event after everything has been reloaded (#9003) This event is going to be more important very shortly (hopefully) --- ...35-Added-ServerResourcesReloadedEvent.patch | 18 +++++++++--------- patches/server/0804-Custom-Potion-Mixes.patch | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/patches/server/0535-Added-ServerResourcesReloadedEvent.patch b/patches/server/0535-Added-ServerResourcesReloadedEvent.patch index 0ca99f1ed8..d8c84bb75c 100644 --- a/patches/server/0535-Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/0535-Added-ServerResourcesReloadedEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7fe23adc486e33e70d02e3855d8080a31a0eeeb5..eb365f8166a233e3e636722072c7130e9cafc1fb 100644 +index 7fe23adc486e33e70d02e3855d8080a31a0eeeb5..38b6de0d150f62fbc68b10680752347a05bb7301 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2009,7 +2009,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop reloadResources(Collection dataPacks) { + return this.reloadResources(dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN); + } @@ -22,14 +22,14 @@ index 7fe23adc486e33e70d02e3855d8080a31a0eeeb5..eb365f8166a233e3e636722072c7130e RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE); CompletableFuture completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error -@@ -2037,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop