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/UnbreakableComponent
intermediary net/minecraft/class_9300
official cxx
named showInTooltip
intermediary comp_2417
official c
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<UnbreakableComponent> static final PacketCodec
<ByteBuf, UnbreakableComponent> private final boolean
The field for theshowInTooltip
record component.private static final Text
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTooltip
(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theshowInTooltip
record component.final String
toString()
Returns a string representation of this record class.withShowInTooltip
(boolean showInTooltip)
-
Field Details
-
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltip
record component. -
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
- 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
- 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
- Specified by:
appendTooltip
in interfaceTooltipAppender
- 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
- 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
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 theshowInTooltip
record component.- Returns:
- the value of the
showInTooltip
record component
-