Package net.minecraft.item
Record Class FoodComponent.class_9423
java.lang.Object
java.lang.Record
net.minecraft.item.FoodComponent.class_9423
- Record Components:
effect-probability-
- Enclosing class:
FoodComponent
public static record FoodComponent.class_9423(StatusEffectInstance effect, float probability)
extends Record
- Mappings:
Namespace Name official coa$bintermediary net/minecraft/class_4174$class_9423named net/minecraft/item/FoodComponent$class_9423official cintermediary comp_2496named effectofficial dintermediary comp_2497named probability
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StatusEffectInstanceThe field for theeffectrecord component.static final com.mojang.serialization.Codec<FoodComponent.class_9423> static final PacketCodec<RegistryByteBuf, FoodComponent.class_9423> 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. -
field_49996
- Mappings:
Namespace Name Mixin selector official aLcoa$b;a:Lcom/mojang/serialization/Codec;intermediary field_49996Lnet/minecraft/class_4174$class_9423;field_49996:Lcom/mojang/serialization/Codec;named field_49996Lnet/minecraft/item/FoodComponent$class_9423;field_49996:Lcom/mojang/serialization/Codec;
-
field_49997
- Mappings:
Namespace Name Mixin selector official bLcoa$b;b:Lys;intermediary field_49997Lnet/minecraft/class_4174$class_9423;field_49997:Lnet/minecraft/class_9139;named field_49997Lnet/minecraft/item/FoodComponent$class_9423;field_49997:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
class_9423
-
-
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
-