Class KeybindTextContent

java.lang.Object
net.minecraft.text.KeybindTextContent
All Implemented Interfaces:
TextContent

public class KeybindTextContent extends Object implements TextContent
The keybind text content. This getTranslated() implementation is not thread-safe.
Mappings:
Namespace Name
official uo
intermediary net/minecraft/class_2572
named net/minecraft/text/KeybindTextContent
  • Field Details

    • key

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

      @Nullable private @Nullable Supplier<Text> translated
      Mappings:
      Namespace Name Mixin selector
      official c Luo;c:Ljava/util/function/Supplier;
      intermediary field_11768 Lnet/minecraft/class_2572;field_11768:Ljava/util/function/Supplier;
      named translated Lnet/minecraft/text/KeybindTextContent;translated:Ljava/util/function/Supplier;
  • Constructor Details

    • KeybindTextContent

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

    • getTranslated

      private Text getTranslated()
      Mappings:
      Namespace Name Mixin selector
      official b Luo;b()Ltl;
      intermediary method_27691 Lnet/minecraft/class_2572;method_27691()Lnet/minecraft/class_2561;
      named getTranslated Lnet/minecraft/text/KeybindTextContent;getTranslated()Lnet/minecraft/text/Text;
    • visit

      public <T> Optional<T> visit(StringVisitable.Visitor<T> visitor)
      Visits this content. Returns a value if the visitor terminates amid the visit, or Optional.empty() if it proceeds.
      Specified by:
      visit in interface TextContent
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ltm;a(Ltp$a;)Ljava/util/Optional;
      intermediary method_27659 Lnet/minecraft/class_7417;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
    • visit

      public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> visitor, Style style)
      Visits this content. Returns a value if the visitor terminates amid the visit, or Optional.empty() if it proceeds.
      Specified by:
      visit in interface TextContent
      Returns:
      Optional.empty() if the visit finished, or a terminating result from the visitor
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ltm;a(Ltp$b;Luh;)Ljava/util/Optional;
      intermediary method_27660 Lnet/minecraft/class_7417;method_27660(Lnet/minecraft/class_5348$class_5246;Lnet/minecraft/class_2583;)Ljava/util/Optional;
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)Ljava/util/Optional;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      official equals Luo;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2572;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/text/KeybindTextContent;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public String getKey()
      Mappings:
      Namespace Name Mixin selector
      official a Luo;a()Ljava/lang/String;
      intermediary method_10901 Lnet/minecraft/class_2572;method_10901()Ljava/lang/String;
      named getKey Lnet/minecraft/text/KeybindTextContent;getKey()Ljava/lang/String;