mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 07:55:53 +00:00
[1.18.2] Fix tags for custom forge registries. (#8495)
Tag-enabled registries must now be registered to vanilla's root registry. See RegistryBuilder#hasTags. Modded tag-enabled registries have to use the format `data/<namespace>/tags/<registrynamespace>/<registryname>/<tag>.json` This format is to prevent conflicts for registries with the same path but different namespaces EX: Registry name `examplemod:shoe`, tag name `blue_shoes` would be `data/<namespace>/tags/examplemod/shoe/blue_shoes.json` RegistryEvent.NewRegistry has been moved and renamed to NewRegistryEvent. RegistryBuilder#create has been made private. See NewRegistryEvent#create Created new ITagManager system for looking up Forge tags. See IForgeRegistry#tags. Add lookup methods for Holders from forge registries. See IForgeRegistry#getHolder.
This commit is contained in:
1 parent
30f3a7dbba
commit
ad75cb8644
51 files changed
+1621
-531
No files matched your search
@@ -116,11 +116,11 @@ public class LootModifierManager extends SimpleJsonResourceReloadListener {
|
||||
|
||||
ResourceLocation serializer = new ResourceLocation(GsonHelper.getAsString(object, "type"));
|
||||
|
||||
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.getValue(serializer).read(location, object, lootConditions);
|
||||
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.get().getValue(serializer).read(location, object, lootConditions);
|
||||
}
|
||||
|
||||
public static GlobalLootModifierSerializer<?> getSerializerForName(ResourceLocation resourcelocation) {
|
||||
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.getValue(resourcelocation);
|
||||
return ForgeRegistries.LOOT_MODIFIER_SERIALIZERS.get().getValue(resourcelocation);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user