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 Details

    • add

      void add(String translationKey, String value)
      Adds a translation.
      Parameters:
      translationKey - The key of the translation.
      value - The value of the entry.
    • add

      default void add(Item item, String value)
      Adds a translation for an Item.
      Parameters:
      item - The Item to get the translation key from.
      value - The value of the entry.
    • add

      default void add(Block block, String value)
      Adds a translation for a Block.
      Parameters:
      block - The Block to get the translation key from.
      value - The value of the entry.
    • add

      default void add(RegistryKey<ItemGroup> registryKey, String value)
      Adds a translation for an ItemGroup.
      Parameters:
      registryKey - The RegistryKey to get the translation key from.
      value - The value of the entry.
    • add

      default void add(EntityType<?> entityType, String value)
      Adds a translation for an EntityType.
      Parameters:
      entityType - The EntityType to get the translation key from.
      value - The value of the entry.
    • add

      default void add(Enchantment enchantment, String value)
      Adds a translation for an Enchantment.
      Parameters:
      enchantment - The Enchantment to get the translation key from.
      value - The value of the entry.
    • add

      default void add(EntityAttribute entityAttribute, String value)
      Adds a translation for an EntityAttribute.
      Parameters:
      entityAttribute - The EntityAttribute to get the translation key from.
      value - The value of the entry.
    • add

      default void add(StatType<?> statType, String value)
      Adds a translation for a StatType.
      Parameters:
      statType - The StatType to get the translation key from.
      value - The value of the entry.
    • add

      default void add(StatusEffect statusEffect, String value)
      Adds a translation for a StatusEffect.
      Parameters:
      statusEffect - The StatusEffect to get the translation key from.
      value - The value of the entry.
    • add

      default void add(Identifier identifier, String value)
      Adds a translation for an Identifier.
      Parameters:
      identifier - The Identifier to get the translation key from.
      value - The value of the entry.
    • add

      default void add(Path existingLanguageFile) throws IOException
      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.