Allow subclasses of lang provider to change output path (#5069)

* Allow subclasses of lang providers to change output path

* Add javadoc

* Add [@]param note

* Checkstyle fix

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit 69974c4edd)
This commit is contained in:
skycatminepokie 2025-12-21 07:40:24 -08:00 committed by modmuss50
parent 0c2027943e
commit 67ce3cfac8

View file

@ -108,7 +108,12 @@ public abstract class FabricLanguageProvider implements DataProvider {
});
}
private Path getLangFilePath(String code) {
/**
* Override this method to change where the generated language file is placed.
*
* @param code The language code (like "en_us") of the translations.
*/
protected Path getLangFilePath(String code) {
return dataOutput
.createPathProvider(PackOutput.Target.RESOURCE_PACK, "lang")
.json(Identifier.fromNamespaceAndPath(dataOutput.getModId(), code));