Package net.minecraft.component.type
Record Class DyedColorComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.DyedColorComponent
- Record Components:
rgb-
- All Implemented Interfaces:
TooltipAppender
- Mappings:
Namespace Name named net/minecraft/component/type/DyedColorComponentintermediary net/minecraft/class_9282official dnbnamed rgbintermediary comp_2384official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DyedColorComponent> static final intstatic final PacketCodec<ByteBuf, DyedColorComponent> private final intThe field for thergbrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDyedColorComponent(int rgb) Creates an instance of aDyedColorComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) 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 ItemStackfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
rgb
private final int rgbThe field for thergbrecord component. -
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 aLdnb;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 bLdnb;b:Laao;
-
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 cLdnb;c:I
-
-
Constructor Details
-
DyedColorComponent
public DyedColorComponent(int rgb) Creates an instance of aDyedColorComponentrecord class.- Parameters:
rgb- the value for thergbrecord component
-
-
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 aLdnb;a(Ldkm;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 aLdnb;a(Ldkm;Ljava/util/List;)Ldkm;
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) - 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;Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;Lnet/minecraft/class_9473;)Vofficial aLdnw;a(Ldki$b;Ljava/util/function/Consumer;Ldmc;Lkd;)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 '=='. -
rgb
public int rgb()Returns the value of thergbrecord component.- Returns:
- the value of the
rgbrecord component
-