mirror of
https://github.com/FabricMC/fabric
synced 2026-08-19 06:26:07 -04:00
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>
This commit is contained in:
parent
0469e9ce61
commit
69974c4edd
1 changed files with 6 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue