Package net.minecraft.text
Class KeybindText
java.lang.Object
net.minecraft.text.BaseText
net.minecraft.text.KeybindText
- All Implemented Interfaces:
com.mojang.brigadier.Message,MutableText,StringRenderable,Text
public class KeybindText extends BaseText
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringRenderable
StringRenderable.StyledVisitor<T>, StringRenderable.Visitor<T> -
Field Summary
Fields Modifier and Type Field Description private Stringkeyprivate Supplier<Text>translatedprivate static Function<String,Supplier<Text>>translator -
Constructor Summary
Constructors Constructor Description KeybindText(String key) -
Method Summary
Modifier and Type Method Description KeybindTextcopy()Copies the text itself, excluding the styles or siblings.booleanequals(Object obj)StringgetKey()private TextgetTranslated()static voidsetTranslator(Function<String,Supplier<Text>> translator)StringtoString()<T> Optional<T>visitSelf(StringRenderable.StyledVisitor<T> visitor, Style style)Visits the text itself.<T> Optional<T>visitSelf(StringRenderable.Visitor<T> visitor)Visits the text itself.Methods inherited from class net.minecraft.text.BaseText
append, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
Constructor Details
-
Method Details
-
setTranslator
-
getTranslated
-
visitSelf
Visits the text itself.- Parameters:
visitor- the visitor- Returns:
- the visitor's return value
- See Also:
Text.visit(Visitor)
-
visitSelf
@Environment(CLIENT) public <T> Optional<T> visitSelf(StringRenderable.StyledVisitor<T> visitor, Style style)Visits the text itself.- Parameters:
visitor- the visitorstyle- the current style- Returns:
- the visitor's return value
- See Also:
Text.visit(StyledVisitor, Style)
-
copy
Description copied from interface:TextCopies the text itself, excluding the styles or siblings. -
equals
-
toString
-
getKey
-