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$StatusEffectEntry
intermediary net/minecraft/class_4174$class_9423
official cpp$b
named effect
intermediary comp_2496
official c
named probability
intermediary comp_2497
official d
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<FoodComponent.StatusEffectEntry> private final StatusEffectInstance
The field for theeffect
record component.static final PacketCodec
<RegistryByteBuf, FoodComponent.StatusEffectEntry> private final float
The field for theprobability
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioneffect()
Returns the value of theeffect
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of theprobability
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
effect
The field for theeffect
record component. -
probability
private final float probabilityThe field for theprobability
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/component/type/FoodComponent$StatusEffectEntry;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_49996
Lnet/minecraft/class_4174$class_9423;field_49996:Lcom/mojang/serialization/Codec;
official a
Lcpp$b;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/FoodComponent$StatusEffectEntry;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_49997
Lnet/minecraft/class_4174$class_9423;field_49997:Lnet/minecraft/class_9139;
official b
Lcpp$b;b:Lyw;
-
-
Constructor Details
-
StatusEffectEntry
-
-
Method Details
-
effect
Returns the value of theeffect
record component.- Returns:
- the value of the
effect
record 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 theprobability
record component.- Returns:
- the value of the
probability
record component
-