Record Class SuspiciousStewEffects
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.SuspiciousStewEffects
- All Implemented Interfaces:
ConsumableListener, TooltipProvider
public record SuspiciousStewEffects(List<SuspiciousStewEffects.Entry> effects)
extends Record
implements ConsumableListener, TooltipProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SuspiciousStewEffects> static final intprivate final List<SuspiciousStewEffects.Entry> The field for theeffectsrecord component.static final SuspiciousStewEffectsstatic final StreamCodec<RegistryFriendlyByteBuf, SuspiciousStewEffects> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSuspiciousStewEffectsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidonConsume(Level level, LivingEntity user, ItemStack stack, Consumable consumable) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffectsrecord component. -
EMPTY
-
DEFAULT_DURATION
public static final int DEFAULT_DURATION- See Also:
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
SuspiciousStewEffects
Creates an instance of aSuspiciousStewEffectsrecord class.- Parameters:
effects- the value for theeffectsrecord component
-
-
Method Details
-
withEffectAdded
-
onConsume
- Specified by:
onConsumein interfaceConsumableListener
-
addToTooltip
public void addToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) - Specified by:
addToTooltipin interfaceTooltipProvider
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-