Interface FabricLanguageProvider.TranslationBuilder
- Enclosing class:
- FabricLanguageProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@NonExtendable
@FunctionalInterface
public static interface FabricLanguageProvider.TranslationBuilder
A consumer used by
FabricLanguageProvider.generateTranslations(TranslationBuilder)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a translation.default void
Merges an existing language file into the generated language file.default void
Adds a translation for aBlock
.default void
Adds a translation for anEnchantment
.default void
Adds a translation for anEntityAttribute
.default void
Adds a translation for aStatusEffect
.default void
Adds a translation for anEntityType
.default void
Adds a translation for anItemGroup
.default void
Adds a translation for anItem
.default void
Adds a translation for aStatType
.
-
Method Details
-
add
Adds a translation.- Parameters:
translationKey
- The key of the translation.value
- The value of the entry.
-
add
Adds a translation for anItem
.- Parameters:
item
- TheItem
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for aBlock
.- Parameters:
block
- TheBlock
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for anItemGroup
.- Parameters:
group
- TheItemGroup
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for anEntityType
.- Parameters:
entityType
- TheEntityType
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for anEnchantment
.- Parameters:
enchantment
- TheEnchantment
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for anEntityAttribute
.- Parameters:
entityAttribute
- TheEntityAttribute
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for aStatType
.- Parameters:
statType
- TheStatType
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for aStatusEffect
.- Parameters:
statusEffect
- TheStatusEffect
to get the translation key from.value
- The value of the entry.
-
add
Merges an existing language file into the generated language file.- Parameters:
existingLanguageFile
- The path to the existing language file.- Throws:
IOException
- If loading the language file failed.
-