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,StringVisitable,Text
public class KeybindText extends BaseText
- Mappings:
Namespace Name official onintermediary net/minecraft/class_2572named net/minecraft/text/KeybindText
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>Nested classes/interfaces inherited from interface net.minecraft.text.Text
Text.Serializer -
Field Summary
Fields Modifier and Type Field Description private Stringkeyprivate Supplier<Text>translatedprivate static Function<String,Supplier<Text>>translatorFields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT -
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(StringVisitable.StyledVisitor<T> visitor, Style style)Visits the text itself.<T> Optional<T>visitSelf(StringVisitable.Visitor<T> visitor)Visits the text itself.Methods inherited from class net.minecraft.text.BaseText
append, asOrderedText, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.text.MutableText
append, fillStyle, formatted, formatted, styledMethods inherited from interface net.minecraft.text.Text
asTruncatedString, getString, visit, visit
-
Field Details
-
translator
- Mappings:
Namespace Name Mixin selector official dLon;d:Ljava/util/function/Function;intermediary field_11766Lnet/minecraft/class_2572;field_11766:Ljava/util/function/Function;named translatorLnet/minecraft/text/KeybindText;translator:Ljava/util/function/Function;
-
key
- Mappings:
Namespace Name Mixin selector official eLon;e:Ljava/lang/String;intermediary field_11767Lnet/minecraft/class_2572;field_11767:Ljava/lang/String;named keyLnet/minecraft/text/KeybindText;key:Ljava/lang/String;
-
translated
- Mappings:
Namespace Name Mixin selector official fLon;f:Ljava/util/function/Supplier;intermediary field_11768Lnet/minecraft/class_2572;field_11768:Ljava/util/function/Supplier;named translatedLnet/minecraft/text/KeybindText;translated:Ljava/util/function/Supplier;
-
-
Constructor Details
-
KeybindText
- Mappings:
Namespace Name Mixin selector official <init>Lon;<init>(Ljava/lang/String;)Vintermediary <init>Lnet/minecraft/class_2572;<init>(Ljava/lang/String;)Vnamed <init>Lnet/minecraft/text/KeybindText;<init>(Ljava/lang/String;)V
-
-
Method Details
-
setTranslator
- Mappings:
Namespace Name Mixin selector official aLon;a(Ljava/util/function/Function;)Vintermediary method_27690Lnet/minecraft/class_2572;method_27690(Ljava/util/function/Function;)Vnamed setTranslatorLnet/minecraft/text/KeybindText;setTranslator(Ljava/util/function/Function;)V
-
getTranslated
- Mappings:
Namespace Name Mixin selector official jLon;j()Loi;intermediary method_27691Lnet/minecraft/class_2572;method_27691()Lnet/minecraft/class_2561;named getTranslatedLnet/minecraft/text/KeybindText;getTranslated()Lnet/minecraft/text/Text;
-
visitSelf
Visits the text itself.- Parameters:
visitor- the visitor- Returns:
- the visitor's return value
- See Also:
Text.visit(Visitor)- Mappings:
Namespace Name Mixin selector official bLoi;b(Lol$a;)Ljava/util/Optional;intermediary method_27659Lnet/minecraft/class_2561;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;named visitSelfLnet/minecraft/text/Text;visitSelf(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
-
visitSelf
@Environment(CLIENT) public <T> Optional<T> visitSelf(StringVisitable.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)- Mappings:
Namespace Name Mixin selector official bLoi;b(Lol$b;Los;)Ljava/util/Optional;intermediary method_27660Lnet/minecraft/class_2561;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;named visitSelfLnet/minecraft/text/Text;visitSelf(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;
-
copy
Description copied from interface:TextCopies the text itself, excluding the styles or siblings.- Specified by:
copyin interfaceText- Specified by:
copyin classBaseText- Mappings:
Namespace Name Mixin selector official hLon;h()Lon;intermediary method_10902Lnet/minecraft/class_2572;method_10902()Lnet/minecraft/class_2572;named copyLnet/minecraft/text/KeybindText;copy()Lnet/minecraft/text/KeybindText;
-
equals
-
toString
-
getKey
- Mappings:
Namespace Name Mixin selector official iLon;i()Ljava/lang/String;intermediary method_10901Lnet/minecraft/class_2572;method_10901()Ljava/lang/String;named getKeyLnet/minecraft/text/KeybindText;getKey()Ljava/lang/String;
-