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
named net/minecraft/text/KeybindTextContent
intermediary net/minecraft/class_2572
official yz
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<KeybindTextContent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/text/KeybindTextContent;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_46619 Lnet/minecraft/class_2572;field_46619:Lcom/mojang/serialization/MapCodec;
      official a Lyz;a:Lcom/mojang/serialization/MapCodec;
    • TYPE

      public static final TextContent.Type<KeybindTextContent> TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/text/KeybindTextContent;TYPE:Lnet/minecraft/text/TextContent$Type;
      intermediary field_46620 Lnet/minecraft/class_2572;field_46620:Lnet/minecraft/class_7417$class_8823;
      official b Lyz;b:Lxw$a;
    • key

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

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

    • KeybindTextContent

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

    • getTranslated

      private Text getTranslated()
      Mappings:
      Namespace Name Mixin selector
      named getTranslated Lnet/minecraft/text/KeybindTextContent;getTranslated()Lnet/minecraft/text/Text;
      intermediary method_27691 Lnet/minecraft/class_2572;method_27691()Lnet/minecraft/class_2561;
      official c Lyz;c()Lxv;
    • 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
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$Visitor;)Ljava/util/Optional;
      intermediary method_27659 Lnet/minecraft/class_7417;method_27659(Lnet/minecraft/class_5348$class_5245;)Ljava/util/Optional;
      official a Lxw;a(Lya$a;)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
      named visit Lnet/minecraft/text/TextContent;visit(Lnet/minecraft/text/StringVisitable$StyledVisitor;Lnet/minecraft/text/Style;)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;
      official a Lxw;a(Lya$b;Lys;)Ljava/util/Optional;
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/text/KeybindTextContent;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2572;equals(Ljava/lang/Object;)Z
      official equals Lyz;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
      named getKey Lnet/minecraft/text/KeybindTextContent;getKey()Ljava/lang/String;
      intermediary method_10901 Lnet/minecraft/class_2572;method_10901()Ljava/lang/String;
      official b Lyz;b()Ljava/lang/String;
    • getType

      public TextContent.Type<?> getType()
      Specified by:
      getType in interface TextContent
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/text/TextContent;getType()Lnet/minecraft/text/TextContent$Type;
      intermediary method_54163 Lnet/minecraft/class_7417;method_54163()Lnet/minecraft/class_7417$class_8823;
      official a Lxw;a()Lxw$a;