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
-
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
add
(StatusEffect statusEffect, String value) Adds a translation for aStatusEffect
.default void
add
(EntityType<?> entityType, String value) Adds a translation for anEntityType
.default void
Adds a translation for anItem
.default void
add
(RegistryEntry<EntityAttribute> entityAttribute, String value) Adds a translation for anEntityAttribute
.default void
add
(RegistryKey<ItemGroup> registryKey, String value) Adds a translation for anItemGroup
.default void
Adds a translation for aTagKey
.default void
Adds a translation for aStatType
.default void
add
(Identifier identifier, String value) Adds a translation for anIdentifier
.default void
addEnchantment
(RegistryKey<Enchantment> enchantment, String value) Adds a translation for anEnchantment
.
-
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:
registryKey
- TheRegistryKey
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.
-
addEnchantment
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
Adds a translation for anIdentifier
.- Parameters:
identifier
- TheIdentifier
to get the translation key from.value
- The value of the entry.
-
add
Adds a translation for aTagKey
.- Parameters:
tagKey
- theTagKey
to get the translation key fromvalue
- 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.
-