Package net.minecraft.component.type
Record Class ExchangeValueComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.ExchangeValueComponent
- Record Components:
value-
- All Implemented Interfaces:
TooltipAppender
- Mappings:
Namespace Name named net/minecraft/component/type/ExchangeValueComponentintermediary net/minecraft/class_11054official dfpnamed valueintermediary comp_3943official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ExchangeValueComponent> static final PacketCodec<ByteBuf, ExchangeValueComponent> private final floatThe field for thevaluerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, @Nullable PlayerEntity player, ItemStack stack) final booleanIndicates whether some other object is "equal to" this one.private floatgetValue(@Nullable PlayerEntity player, Iterable<ItemStack> items) floatgetValue(@Nullable PlayerEntity player, ItemStack stack) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.
-
Field Details
-
value
private final float valueThe field for thevaluerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/ExchangeValueComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_58851Lnet/minecraft/class_11054;field_58851:Lcom/mojang/serialization/Codec;official aLdfp;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/ExchangeValueComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_58852Lnet/minecraft/class_11054;field_58852:Lnet/minecraft/class_9139;official bLdfp;b:Lzg;
-
-
Constructor Details
-
ExchangeValueComponent
public ExchangeValueComponent(float float2)
-
-
Method Details
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, @Nullable @Nullable PlayerEntity player, ItemStack stack) - 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/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)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_1657;Lnet/minecraft/class_1799;)Vofficial aLdgd;a(Ldco$b;Ljava/util/function/Consumer;Ldek;Lcuf;Ldcs;)V
-
getValue
- Mappings:
Namespace Name Mixin selector named getValueLnet/minecraft/component/type/ExchangeValueComponent;getValue(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/item/ItemStack;)Fintermediary method_69583Lnet/minecraft/class_11054;method_69583(Lnet/minecraft/class_1657;Lnet/minecraft/class_1799;)Fofficial aLdfp;a(Lcuf;Ldcs;)F
-
getValue
- Mappings:
Namespace Name Mixin selector named getValueLnet/minecraft/component/type/ExchangeValueComponent;getValue(Lnet/minecraft/entity/player/PlayerEntity;Ljava/lang/Iterable;)Fintermediary method_69584Lnet/minecraft/class_11054;method_69584(Lnet/minecraft/class_1657;Ljava/lang/Iterable;)Fofficial aLdfp;a(Lcuf;Ljava/lang/Iterable;)F
-
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 '=='. -
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-