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 named net/minecraft/component/type/UnbreakableComponentintermediary net/minecraft/class_9300official cxznamed showInTooltipintermediary comp_2417official c
-
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(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type) 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.withShowInTooltip(boolean showInTooltip)
-
Field Details
-
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltiprecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/UnbreakableComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49366Lnet/minecraft/class_9300;field_49366:Lcom/mojang/serialization/Codec;official aLcxz;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/UnbreakableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49367Lnet/minecraft/class_9300;field_49367:Lnet/minecraft/class_9139;official bLcxz;b:Lyx;
-
TOOLTIP_TEXT
- Mappings:
Namespace Name Mixin selector named TOOLTIP_TEXTLnet/minecraft/component/type/UnbreakableComponent;TOOLTIP_TEXT:Lnet/minecraft/text/Text;intermediary field_49368Lnet/minecraft/class_9300;field_49368:Lnet/minecraft/class_2561;official dLcxz;d:Lwz;
-
-
Constructor Details
-
UnbreakableComponent
public UnbreakableComponent(boolean bool)
-
-
Method Details
-
appendTooltip
- Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/tooltip/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vofficial aLcxy;a(Lcul$b;Ljava/util/function/Consumer;Lcwm;)V
-
withShowInTooltip
- Mappings:
Namespace Name Mixin selector named withShowInTooltipLnet/minecraft/component/type/UnbreakableComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/UnbreakableComponent;intermediary method_58435Lnet/minecraft/class_9300;method_58435(Z)Lnet/minecraft/class_9300;official aLcxz;a(Z)Lcxz;
-
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
-