Package net.minecraft.component.type
Record Class FoodComponent.StatusEffectEntry
java.lang.Object
java.lang.Record
net.minecraft.component.type.FoodComponent.StatusEffectEntry
- Record Components:
effect-probability-
- Enclosing class:
FoodComponent
public static record FoodComponent.StatusEffectEntry(StatusEffectInstance effect, float probability)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/FoodComponent$StatusEffectEntryintermediary net/minecraft/class_4174$class_9423official cpr$bnamed effectintermediary comp_2496official cnamed probabilityintermediary comp_2497official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FoodComponent.StatusEffectEntry> private final StatusEffectInstanceThe field for theeffectrecord component.static final PacketCodec<RegistryByteBuf, FoodComponent.StatusEffectEntry> private final floatThe field for theprobabilityrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioneffect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of theprobabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effect
The field for theeffectrecord component. -
probability
private final float probabilityThe field for theprobabilityrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/FoodComponent$StatusEffectEntry;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49996Lnet/minecraft/class_4174$class_9423;field_49996:Lcom/mojang/serialization/Codec;official aLcpr$b;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/FoodComponent$StatusEffectEntry;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49997Lnet/minecraft/class_4174$class_9423;field_49997:Lnet/minecraft/class_9139;official bLcpr$b;b:Lyx;
-
-
Constructor Details
-
StatusEffectEntry
-
-
Method Details
-
effect
Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
probability
public float probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-