mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Run 'freeze' listeners before tag events (#11606)
This commit is contained in:
parent
89bd3e5c99
commit
c72a463cb5
@ -1204,10 +1204,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ list.forEach(loader -> loadable.apply((RegistryDataLoader.Loader<?>)loader, registryInfoLookup, conversions));
|
||||
list.forEach(loader -> {
|
||||
Registry<?> registry = loader.registry();
|
||||
+ io.papermc.paper.registry.PaperRegistryListenerManager.INSTANCE.runFreezeListeners(loader.registry.key(), conversions); // Paper - run pre-freeze listeners
|
||||
|
||||
try {
|
||||
registry.freeze();
|
||||
@@ -0,0 +0,0 @@ public class RegistryDataLoader {
|
||||
}
|
||||
|
||||
@ -1243,6 +1240,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
} catch (Exception var15) {
|
||||
errors.put(
|
||||
resourceKey,
|
||||
@@ -0,0 +0,0 @@ public class RegistryDataLoader {
|
||||
}
|
||||
}
|
||||
|
||||
+ io.papermc.paper.registry.PaperRegistryListenerManager.INSTANCE.runFreezeListeners(registry.key(), conversions); // Paper - run pre-freeze listeners
|
||||
TagLoader.loadTagsForRegistry(resourceManager, registry);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class RegistryDataLoader {
|
||||
RegistryOps.RegistryInfoLookup infoGetter,
|
||||
WritableRegistry<E> registry,
|
||||
|
@ -465,9 +465,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
+++ b/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
@@ -0,0 +0,0 @@ public class RegistryDataLoader {
|
||||
}
|
||||
}
|
||||
|
||||
io.papermc.paper.registry.PaperRegistryListenerManager.INSTANCE.runFreezeListeners(registry.key(), conversions); // Paper - run pre-freeze listeners
|
||||
- TagLoader.loadTagsForRegistry(resourceManager, registry);
|
||||
+ TagLoader.loadTagsForRegistry(resourceManager, registry, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL); // Paper - tag lifecycle - add cause
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user