mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 18:50:51 +01:00
11 lines
827 B
Diff
11 lines
827 B
Diff
|
--- a/net/minecraft/server/ReloadableServerRegistries.java
|
||
|
+++ b/net/minecraft/server/ReloadableServerRegistries.java
|
||
|
@@ -64,6 +64,7 @@
|
||
|
) {
|
||
|
return CompletableFuture.supplyAsync(() -> {
|
||
|
WritableRegistry<T> writableRegistry = new MappedRegistry<>(type.registryKey(), Lifecycle.experimental());
|
||
|
+ io.papermc.paper.registry.PaperRegistryAccess.instance().registerReloadableRegistry(type.registryKey(), writableRegistry); // Paper - register reloadable registry
|
||
|
Map<ResourceLocation, T> map = new HashMap<>();
|
||
|
SimpleJsonResourceReloadListener.scanDirectory(resourceManager, type.registryKey(), ops, type.codec(), map);
|
||
|
map.forEach((id, value) -> writableRegistry.register(ResourceKey.create(type.registryKey(), id), (T)value, DEFAULT_REGISTRATION_INFO));
|