Interface StringTranslatable

All Superinterfaces:
net.minecraft.util.StringRepresentable
All Known Implementing Classes:
Position

public interface StringTranslatable extends net.minecraft.util.StringRepresentable
Replacement for Minecraft's former TranslatableOption, using StringRepresentable as a "backend". This exists because StringIdentifiable doesn't provide any translation capability.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable

    net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable>
  • Field Summary

    Fields inherited from interface net.minecraft.util.StringRepresentable

    PRE_BUILT_MAP_THRESHOLD
  • Method Summary

    Modifier and Type
    Method
    Description
    Name of the option, also used as its unique identifier for StringRepresentable.
    default @NotNull String
     
    default net.minecraft.network.chat.Component
    Constructs a default Component object containing the translated value.
    The translation key of the option
  • Method Details

    • getName

      String getName()
      Name of the option, also used as its unique identifier for StringRepresentable.
      Returns:
      The name of the option
      See Also:
      • StringRepresentable.getSerializedName()
    • getTranslationKey

      String getTranslationKey()
      The translation key of the option
      Returns:
      The translation key
    • getSerializedName

      @NotNull default @NotNull String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
    • getText

      default net.minecraft.network.chat.Component getText()
      Constructs a default Component object containing the translated value.
      Returns:
      The text object
      See Also: