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 TypeMethodDescriptionvoidAdds a translation.default voidMerges an existing language file into the generated language file.default voidAdds a translation for aBlock.default voidadd(StatusEffect statusEffect, String value) Adds a translation for aStatusEffect.default voidadd(EntityType<?> entityType, String value) Adds a translation for anEntityType.default voidAdds a translation for anItem.default voidadd(RegistryEntry<EntityAttribute> entityAttribute, String value) Adds a translation for anEntityAttribute.default voidadd(RegistryKey<ItemGroup> registryKey, String value) Adds a translation for anItemGroup.default voidAdds a translation for aTagKey.default voidadd(SoundEvent sound, String value) Adds a subtitle translation for aSoundEventof the formsubtitles.<namespace>.<path>.default voidAdds a translation for aStatType.default voidadd(Identifier identifier, String value) Adds a translation for anIdentifier.default voidaddEnchantment(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- TheItemto get the translation key from.value- The value of the entry.
-
add
Adds a translation for aBlock.- Parameters:
block- TheBlockto get the translation key from.value- The value of the entry.
-
add
Adds a translation for anItemGroup.- Parameters:
registryKey- TheRegistryKeyto get the translation key from.value- The value of the entry.
-
add
Adds a translation for anEntityType.- Parameters:
entityType- TheEntityTypeto get the translation key from.value- The value of the entry.
-
addEnchantment
Adds a translation for anEnchantment.- Parameters:
enchantment- TheEnchantmentto get the translation key from.value- The value of the entry.
-
add
Adds a translation for anEntityAttribute.- Parameters:
entityAttribute- TheEntityAttributeto get the translation key from.value- The value of the entry.
-
add
Adds a translation for aStatType.- Parameters:
statType- TheStatTypeto get the translation key from.value- The value of the entry.
-
add
Adds a translation for aStatusEffect.- Parameters:
statusEffect- TheStatusEffectto get the translation key from.value- The value of the entry.
-
add
Adds a translation for anIdentifier.- Parameters:
identifier- TheIdentifierto get the translation key from.value- The value of the entry.
-
add
Adds a translation for aTagKey.- Parameters:
tagKey- theTagKeyto get the translation key fromvalue- the value of the entry
-
add
Adds a subtitle translation for aSoundEventof the formsubtitles.<namespace>.<path>. If the sound event uses a non-standard translation key for its subtitle, useadd(String, String)instead.- Parameters:
sound- TheSoundEventto 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.
-