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>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S> -
Field Summary
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptiongetName()Name of the option, also used as its unique identifier forStringRepresentable.default @NotNull Stringdefault net.minecraft.network.chat.ComponentgetText()Constructs a defaultComponentobject 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 forStringRepresentable.- Returns:
- The name of the option
- See Also:
-
getTranslationKey
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-
getText
default net.minecraft.network.chat.Component getText()Constructs a defaultComponentobject containing the translated value.- Returns:
- The text object
- See Also:
-