Package net.minecraft.component.type
Record Class UnbreakableComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.UnbreakableComponent
- Record Components:
showInTooltip-
- All Implemented Interfaces:
TooltipAppender
- Mappings:
Namespace Name official cutintermediary net/minecraft/class_9300named net/minecraft/component/type/UnbreakableComponentofficial cintermediary comp_2417named showInTooltip
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<UnbreakableComponent> static final PacketCodec<ByteBuf, UnbreakableComponent> private final booleanThe field for theshowInTooltiprecord component.private static final Text -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Consumer<Text> textConsumer, TooltipContext context) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theshowInTooltiprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltiprecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLcut;a:Lcom/mojang/serialization/Codec;intermediary field_49366Lnet/minecraft/class_9300;field_49366:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/component/type/UnbreakableComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official bLcut;b:Lyg;intermediary field_49367Lnet/minecraft/class_9300;field_49367:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/component/type/UnbreakableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
TOOLTIP_TEXT
- Mappings:
Namespace Name Mixin selector official dLcut;d:Lwi;intermediary field_49368Lnet/minecraft/class_9300;field_49368:Lnet/minecraft/class_2561;named TOOLTIP_TEXTLnet/minecraft/component/type/UnbreakableComponent;TOOLTIP_TEXT:Lnet/minecraft/text/Text;
-
-
Constructor Details
-
UnbreakableComponent
public UnbreakableComponent(boolean bool)
-
-
Method Details
-
appendTooltip
- Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector official aLcus;a(Ljava/util/function/Consumer;Lcti;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vnamed appendTooltipLnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)V
-
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. -
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. -
equals
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 '=='. -
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltiprecord component.- Returns:
- the value of the
showInTooltiprecord component
-