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 Type
    Method
    Description
    void
    add(String translationKey, String value)
    Adds a translation.
    default void
    add(Path existingLanguageFile)
    Merges an existing language file into the generated language file.
    default void
    add(net.minecraft.block.Block block, String value)
    Adds a translation for a Block.
    default void
    add(net.minecraft.enchantment.Enchantment enchantment, String value)
    Adds a translation for an Enchantment.
    default void
    add(net.minecraft.entity.attribute.EntityAttribute entityAttribute, String value)
    Adds a translation for an EntityAttribute.
    default void
    add(net.minecraft.entity.effect.StatusEffect statusEffect, String value)
    Adds a translation for a StatusEffect.
    default void
    add(net.minecraft.entity.EntityType<?> entityType, String value)
    Adds a translation for an EntityType.
    default void
    add(net.minecraft.item.ItemGroup group, String value)
    Adds a translation for an ItemGroup.
    default void
    add(net.minecraft.item.Item item, String value)
    Adds a translation for an Item.
    default void
    add(net.minecraft.stat.StatType<?> statType, String value)
    Adds a translation for a StatType.
  • 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(net.minecraft.item.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(net.minecraft.block.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(net.minecraft.item.ItemGroup group, String value)
      Adds a translation for an ItemGroup.
      Parameters:
      group - The ItemGroup to get the translation key from.
      value - The value of the entry.
    • add

      default void add(net.minecraft.entity.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(net.minecraft.enchantment.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(net.minecraft.entity.attribute.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(net.minecraft.stat.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(net.minecraft.entity.effect.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(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.