mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Fix existing file tag provider support looking in the wrong folder for custom tag types (#7576)
This commit is contained in:
1 parent
7728dde36b
commit
ab949c7cca
3 files changed
+20
-15
No files matched your search
@@ -56,13 +56,15 @@ public abstract class ForgeRegistryTagsProvider<T extends IForgeRegistryEntry<T>
|
||||
return GameData.getWrapper(forgeRegistry.getRegistryKey(), Lifecycle.experimental(), "default");
|
||||
}
|
||||
|
||||
private final String folder;
|
||||
private static <T extends IForgeRegistryEntry<T>> String getTagFolder(IForgeRegistry<T> registryIn)
|
||||
{
|
||||
String tagFolder = ((ForgeRegistry<T>) registryIn).getTagFolder();
|
||||
return tagFolder == null ? vanillaTypes.get(registryIn) : tagFolder;
|
||||
}
|
||||
|
||||
public ForgeRegistryTagsProvider(DataGenerator generatorIn, IForgeRegistry<T> registryIn, String modId, @Nullable ExistingFileHelper existingFileHelper)
|
||||
{
|
||||
super(generatorIn, wrapRegistry(registryIn), modId, existingFileHelper);
|
||||
String tagFolder = ((ForgeRegistry<T>) registryIn).getTagFolder();
|
||||
folder = tagFolder == null ? vanillaTypes.get(registryIn) : tagFolder;
|
||||
super(generatorIn, wrapRegistry(registryIn), modId, existingFileHelper, getTagFolder(registryIn));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,10 +72,4 @@ public abstract class ForgeRegistryTagsProvider<T extends IForgeRegistryEntry<T>
|
||||
{
|
||||
return generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/" + folder + "/" + id.getPath() + ".json");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTagFolder()
|
||||
{
|
||||
return folder;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user