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 cwe
intermediary net/minecraft/class_9300
named net/minecraft/component/type/UnbreakableComponent
official c
intermediary comp_2417
named showInTooltip
-
Field Summary
FieldsModifier 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTooltip
(Consumer<Text> textConsumer, TooltipContext context) 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 official a
Lcwe;a:Lcom/mojang/serialization/Codec;
intermediary field_49366
Lnet/minecraft/class_9300;field_49366:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/component/type/UnbreakableComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official b
Lcwe;b:Lys;
intermediary field_49367
Lnet/minecraft/class_9300;field_49367:Lnet/minecraft/class_9139;
named PACKET_CODEC
Lnet/minecraft/component/type/UnbreakableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
TOOLTIP_TEXT
- Mappings:
Namespace Name Mixin selector official d
Lcwe;d:Lwu;
intermediary field_49368
Lnet/minecraft/class_9300;field_49368:Lnet/minecraft/class_2561;
named TOOLTIP_TEXT
Lnet/minecraft/component/type/UnbreakableComponent;TOOLTIP_TEXT:Lnet/minecraft/text/Text;
-
-
Constructor Details
-
UnbreakableComponent
public UnbreakableComponent(boolean bool)
-
-
Method Details
-
appendTooltip
- Specified by:
appendTooltip
in interfaceTooltipAppender
- Mappings:
Namespace Name Mixin selector official a
Lcwd;a(Ljava/util/function/Consumer;Lcuq;)V
intermediary method_57409
Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
named appendTooltip
Lnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)V
-
withShowInTooltip
- Mappings:
Namespace Name Mixin selector official a
Lcwe;a(Z)Lcwe;
intermediary method_58435
Lnet/minecraft/class_9300;method_58435(Z)Lnet/minecraft/class_9300;
named withShowInTooltip
Lnet/minecraft/component/type/UnbreakableComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/UnbreakableComponent;
-
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
-