Package net.minecraft.component.type
Record Class DyedColorComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.DyedColorComponent
- Record Components:
rgb-showInTooltip-
- All Implemented Interfaces:
TooltipAppender
public record DyedColorComponent(int rgb, boolean showInTooltip)
extends Record
implements TooltipAppender
- Mappings:
Namespace Name named net/minecraft/component/type/DyedColorComponentintermediary net/minecraft/class_9282official dacnamed rgbintermediary comp_2384official dnamed showInTooltipintermediary comp_2385official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec<DyedColorComponent> static final com.mojang.serialization.Codec<DyedColorComponent> static final intstatic final PacketCodec<ByteBuf, DyedColorComponent> private final intThe field for thergbrecord component.private final booleanThe field for theshowInTooltiprecord component. -
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.static intfinal inthashCode()Returns a hash code value for this object.intrgb()Returns the value of thergbrecord component.static ItemStackbooleanReturns the value of theshowInTooltiprecord component.final StringtoString()Returns a string representation of this record class.withShowInTooltip(boolean showInTooltip)
-
Field Details
-
rgb
private final int rgbThe field for thergbrecord component. -
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltiprecord component. -
BASE_CODEC
- Mappings:
Namespace Name Mixin selector named BASE_CODECLnet/minecraft/component/type/DyedColorComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49750Lnet/minecraft/class_9282;field_49750:Lcom/mojang/serialization/Codec;official fLdac;f:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/DyedColorComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49312Lnet/minecraft/class_9282;field_49312:Lcom/mojang/serialization/Codec;official aLdac;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/DyedColorComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49313Lnet/minecraft/class_9282;field_49313:Lnet/minecraft/class_9139;official bLdac;b:Lzt;
-
DEFAULT_COLOR
public static final int DEFAULT_COLOR- See Also:
- Mappings:
Namespace Name Mixin selector named DEFAULT_COLORLnet/minecraft/component/type/DyedColorComponent;DEFAULT_COLOR:Iintermediary field_49314Lnet/minecraft/class_9282;field_49314:Iofficial cLdac;c:I
-
-
Constructor Details
-
DyedColorComponent
public DyedColorComponent(int int2, boolean bool)
-
-
Method Details
-
getColor
- Mappings:
Namespace Name Mixin selector named getColorLnet/minecraft/component/type/DyedColorComponent;getColor(Lnet/minecraft/item/ItemStack;I)Iintermediary method_57470Lnet/minecraft/class_9282;method_57470(Lnet/minecraft/class_1799;I)Iofficial aLdac;a(Lcxo;I)I
-
setColor
- Mappings:
Namespace Name Mixin selector named setColorLnet/minecraft/component/type/DyedColorComponent;setColor(Lnet/minecraft/item/ItemStack;Ljava/util/List;)Lnet/minecraft/item/ItemStack;intermediary method_57471Lnet/minecraft/class_9282;method_57471(Lnet/minecraft/class_1799;Ljava/util/List;)Lnet/minecraft/class_1799;official aLdac;a(Lcxo;Ljava/util/List;)Lcxo;
-
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 aLdar;a(Lcxk$b;Ljava/util/function/Consumer;Lczg;)V
-
withShowInTooltip
- Mappings:
Namespace Name Mixin selector named withShowInTooltipLnet/minecraft/component/type/DyedColorComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/DyedColorComponent;intermediary method_58422Lnet/minecraft/class_9282;method_58422(Z)Lnet/minecraft/class_9282;official aLdac;a(Z)Ldac;
-
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 '=='. -
rgb
public int rgb()Returns the value of thergbrecord component.- Returns:
- the value of the
rgbrecord component
-
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltiprecord component.- Returns:
- the value of the
showInTooltiprecord component
-