13
0
geforkt von Mirrors/Paper

Fire reload event after everything has been reloaded (#9003)

This event is going to be more important very shortly (hopefully)
Dieser Commit ist enthalten in:
Jake Potrebic 2023-03-19 12:28:28 -07:00
Ursprung 3db404320a
Commit 72dde6b5dd
2 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - add cause
+ @Deprecated
+ @Deprecated @io.papermc.paper.annotation.DoNotUse
public CompletableFuture<Void> reloadResources(Collection<String> dataPacks) {
+ return this.reloadResources(dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN);
+ }
@ -23,13 +23,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings, they can be defined by datapacks so refresh it here
+ new io.papermc.paper.event.server.ServerResourcesReloadedEvent(cause).callEvent(); // Paper - fire after everything has been reloaded
}, this);
this.worldData.setDataConfiguration(worlddataconfiguration);
this.resources.managers.updateRegistryTags(this.registryAccess());
+ new io.papermc.paper.event.server.ServerResourcesReloadedEvent(cause).callEvent(); // Paper
// Paper start
if (Thread.currentThread() != this.serverThread) {
return;
if (this.isSameThread()) {
diff --git a/src/main/java/net/minecraft/server/commands/ReloadCommand.java b/src/main/java/net/minecraft/server/commands/ReloadCommand.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/commands/ReloadCommand.java

Datei anzeigen

@ -32,9 +32,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.worldData.setDataConfiguration(worlddataconfiguration);
this.resources.managers.updateRegistryTags(this.registryAccess());
+ net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper
new io.papermc.paper.event.server.ServerResourcesReloadedEvent(cause).callEvent(); // Paper
// Paper start
if (Thread.currentThread() != this.serverThread) {
return;
diff --git a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java