mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
20 lines
1.3 KiB
Diff
20 lines
1.3 KiB
Diff
--- a/net/minecraft/resources/RegistryDataLoader.java
|
|
+++ b/net/minecraft/resources/RegistryDataLoader.java
|
|
@@ -119,7 +_,7 @@
|
|
}
|
|
|
|
private static String m_246502_(ResourceLocation p_252033_) {
|
|
- return p_252033_.m_135815_();
|
|
+ return net.minecraftforge.common.ForgeHooks.prefixNamespace(p_252033_); // FORGE: add non-vanilla registry namespace to loader directory, same format as tag directory (see net.minecraft.tags.TagManager#getTagDir(ResourceKey))
|
|
}
|
|
|
|
static <E> void m_255048_(RegistryOps.RegistryInfoLookup p_256369_, ResourceManager p_256349_, ResourceKey<? extends Registry<E>> p_255792_, WritableRegistry<E> p_256211_, Decoder<E> p_256232_, Map<ResourceKey<?>, Exception> p_255884_) {
|
|
@@ -136,6 +_,7 @@
|
|
try (Reader reader = resource.m_215508_()) {
|
|
JsonElement jsonelement = JsonParser.parseReader(reader);
|
|
DataResult<E> dataresult = p_256232_.parse(registryops, jsonelement);
|
|
+ if (!net.minecraftforge.common.crafting.conditions.ICondition.shouldRegisterEntry(jsonelement)) continue;
|
|
E e = dataresult.getOrThrow(false, (p_248715_) -> {
|
|
});
|
|
p_256211_.m_255290_(resourcekey, e, resource.m_247137_() ? Lifecycle.stable() : dataresult.lifecycle());
|