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/DyedColorComponent
intermediary net/minecraft/class_9282
official cxj
named rgb
intermediary comp_2384
official d
named showInTooltip
intermediary comp_2385
official e
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<DyedColorComponent> static final com.mojang.serialization.Codec
<DyedColorComponent> static final int
static final PacketCodec
<ByteBuf, DyedColorComponent> private final int
The field for thergb
record component.private final boolean
The field for theshowInTooltip
record component. -
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.static int
final int
hashCode()
Returns a hash code value for this object.int
rgb()
Returns the value of thergb
record component.static ItemStack
boolean
Returns the value of theshowInTooltip
record component.final String
toString()
Returns a string representation of this record class.withShowInTooltip
(boolean showInTooltip)
-
Field Details
-
rgb
private final int rgbThe field for thergb
record component. -
showInTooltip
private final boolean showInTooltipThe field for theshowInTooltip
record component. -
BASE_CODEC
- Mappings:
Namespace Name Mixin selector named BASE_CODEC
Lnet/minecraft/component/type/DyedColorComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;
intermediary field_49750
Lnet/minecraft/class_9282;field_49750:Lcom/mojang/serialization/Codec;
official f
Lcxj;f:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/component/type/DyedColorComponent;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_49312
Lnet/minecraft/class_9282;field_49312:Lcom/mojang/serialization/Codec;
official a
Lcxj;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/DyedColorComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_49313
Lnet/minecraft/class_9282;field_49313:Lnet/minecraft/class_9139;
official b
Lcxj;b:Lzn;
-
DEFAULT_COLOR
public static final int DEFAULT_COLOR- See Also:
- Mappings:
Namespace Name Mixin selector named DEFAULT_COLOR
Lnet/minecraft/component/type/DyedColorComponent;DEFAULT_COLOR:I
intermediary field_49314
Lnet/minecraft/class_9282;field_49314:I
official c
Lcxj;c:I
-
-
Constructor Details
-
DyedColorComponent
public DyedColorComponent(int int2, boolean bool)
-
-
Method Details
-
getColor
- Mappings:
Namespace Name Mixin selector named getColor
Lnet/minecraft/component/type/DyedColorComponent;getColor(Lnet/minecraft/item/ItemStack;I)I
intermediary method_57470
Lnet/minecraft/class_9282;method_57470(Lnet/minecraft/class_1799;I)I
official a
Lcxj;a(Lcur;I)I
-
setColor
- Mappings:
Namespace Name Mixin selector named setColor
Lnet/minecraft/component/type/DyedColorComponent;setColor(Lnet/minecraft/item/ItemStack;Ljava/util/List;)Lnet/minecraft/item/ItemStack;
intermediary method_57471
Lnet/minecraft/class_9282;method_57471(Lnet/minecraft/class_1799;Ljava/util/List;)Lnet/minecraft/class_1799;
official a
Lcxj;a(Lcur;Ljava/util/List;)Lcur;
-
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
Lcxx;a(Lcum$b;Ljava/util/function/Consumer;Lcwk;)V
-
withShowInTooltip
- Mappings:
Namespace Name Mixin selector named withShowInTooltip
Lnet/minecraft/component/type/DyedColorComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/DyedColorComponent;
intermediary method_58422
Lnet/minecraft/class_9282;method_58422(Z)Lnet/minecraft/class_9282;
official a
Lcxj;a(Z)Lcxj;
-
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 thergb
record component.- Returns:
- the value of the
rgb
record component
-
showInTooltip
public boolean showInTooltip()Returns the value of theshowInTooltip
record component.- Returns:
- the value of the
showInTooltip
record component
-