Record Class UnbreakableComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.UnbreakableComponent
Record Components:
showInTooltip -
All Implemented Interfaces:
TooltipAppender

public record UnbreakableComponent(boolean showInTooltip) extends Record implements TooltipAppender
Mappings:
Namespace Name
named net/minecraft/component/type/UnbreakableComponent
intermediary net/minecraft/class_9300
official cxx
named showInTooltip
intermediary comp_2417
official c
  • Field Details

    • showInTooltip

      private final boolean showInTooltip
      The field for the showInTooltip record component.
    • CODEC

      public static final com.mojang.serialization.Codec<UnbreakableComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/UnbreakableComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49366 Lnet/minecraft/class_9300;field_49366:Lcom/mojang/serialization/Codec;
      official a Lcxx;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,UnbreakableComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/UnbreakableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49367 Lnet/minecraft/class_9300;field_49367:Lnet/minecraft/class_9139;
      official b Lcxx;b:Lzn;
    • TOOLTIP_TEXT

      private static final Text TOOLTIP_TEXT
      Mappings:
      Namespace Name Mixin selector
      named TOOLTIP_TEXT Lnet/minecraft/component/type/UnbreakableComponent;TOOLTIP_TEXT:Lnet/minecraft/text/Text;
      intermediary field_49368 Lnet/minecraft/class_9300;field_49368:Lnet/minecraft/class_2561;
      official d Lcxx;d:Lxp;
  • Constructor Details

    • UnbreakableComponent

      public UnbreakableComponent(boolean bool)
  • Method Details

    • appendTooltip

      public void appendTooltip(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type)
      Specified by:
      appendTooltip in interface TooltipAppender
      Mappings:
      Namespace Name Mixin selector
      named appendTooltip Lnet/minecraft/item/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipType;)V
      intermediary method_57409 Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
      official a Lcxw;a(Lcul$b;Ljava/util/function/Consumer;Lcwj;)V
    • withShowInTooltip

      public UnbreakableComponent withShowInTooltip(boolean showInTooltip)
      Mappings:
      Namespace Name Mixin selector
      named withShowInTooltip Lnet/minecraft/component/type/UnbreakableComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/UnbreakableComponent;
      intermediary method_58435 Lnet/minecraft/class_9300;method_58435(Z)Lnet/minecraft/class_9300;
      official a Lcxx;a(Z)Lcxx;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • showInTooltip

      public boolean showInTooltip()
      Returns the value of the showInTooltip record component.
      Returns:
      the value of the showInTooltip record component