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 qe
intermediary net/minecraft/class_2572
named net/minecraft/text/KeybindText
  • Field Details

    • translator

      private static Function<String,Supplier<Text>> translator
      Mappings:
      Namespace Name Mixin selector
      official d Lqe;d:Ljava/util/function/Function;
      intermediary field_11766 Lnet/minecraft/class_2572;field_11766:Ljava/util/function/Function;
      named translator Lnet/minecraft/text/KeybindText;translator:Ljava/util/function/Function;
    • key

      private final String key
      Mappings:
      Namespace Name Mixin selector
      official e Lqe;e:Ljava/lang/String;
      intermediary field_11767 Lnet/minecraft/class_2572;field_11767:Ljava/lang/String;
      named key Lnet/minecraft/text/KeybindText;key:Ljava/lang/String;
    • translated

      private Supplier<Text> translated
      Mappings:
      Namespace Name Mixin selector
      official f Lqe;f:Ljava/util/function/Supplier;
      intermediary field_11768 Lnet/minecraft/class_2572;field_11768:Ljava/util/function/Supplier;
      named translated Lnet/minecraft/text/KeybindText;translated:Ljava/util/function/Supplier;
  • Constructor Details

    • KeybindText

      public KeybindText(String key)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lqe;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_2572;<init>(Ljava/lang/String;)V
      named <init> Lnet/minecraft/text/KeybindText;<init>(Ljava/lang/String;)V
  • Method Details

    • setTranslator

      public static void setTranslator(Function<String,Supplier<Text>> translator)
      Mappings:
      Namespace Name Mixin selector
      official a Lqe;a(Ljava/util/function/Function;)V
      intermediary method_27690 Lnet/minecraft/class_2572;method_27690(Ljava/util/function/Function;)V
      named setTranslator Lnet/minecraft/text/KeybindText;setTranslator(Ljava/util/function/Function;)V
    • getTranslated

      private Text getTranslated()
      Mappings:
      Namespace Name Mixin selector
      official j Lqe;j()Lpz;
      intermediary method_27691 Lnet/minecraft/class_2572;method_27691()Lnet/minecraft/class_2561;
      named getTranslated Lnet/minecraft/text/KeybindText;getTranslated()Lnet/minecraft/text/Text;
    • visitSelf

      public <T> Optional<T> visitSelf(StringVisitable.Visitor<T> visitor)
      Visits the text itself.
      Parameters:
      visitor - the visitor
      Returns:
      the visitor's return value
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lpz;b(Lqc$a;)Ljava/util/Optional;
      intermediary method_27659 Lnet/minecraft/class_2561;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
      named visitSelf Lnet/minecraft/text/Text;visitSelf(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
    • visitSelf

      public <T> Optional<T> visitSelf(StringVisitable.StyledVisitor<T> visitor, Style style)
      Visits the text itself.
      Parameters:
      visitor - the visitor
      style - the current style
      Returns:
      the visitor's return value
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lpz;b(Lqc$b;Lqj;)Ljava/util/Optional;
      intermediary method_27660 Lnet/minecraft/class_2561;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;
      named visitSelf Lnet/minecraft/text/Text;visitSelf(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;
    • copy

      public KeybindText copy()
      Description copied from interface: Text
      Copies the text itself, excluding the styles or siblings.
      Specified by:
      copy in interface Text
      Specified by:
      copy in class BaseText
      Mappings:
      Namespace Name Mixin selector
      official h Lqe;h()Lqe;
      intermediary method_10902 Lnet/minecraft/class_2572;method_10902()Lnet/minecraft/class_2572;
      named copy Lnet/minecraft/text/KeybindText;copy()Lnet/minecraft/text/KeybindText;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseText
      Mappings:
      Namespace Name Mixin selector
      official equals Lpv;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2554;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/text/BaseText;equals(Ljava/lang/Object;)Z
    • toString

      public String toString()
      Overrides:
      toString in class BaseText
    • getKey

      public String getKey()
      Mappings:
      Namespace Name Mixin selector
      official i Lqe;i()Ljava/lang/String;
      intermediary method_10901 Lnet/minecraft/class_2572;method_10901()Ljava/lang/String;
      named getKey Lnet/minecraft/text/KeybindText;getKey()Ljava/lang/String;