Skip to content

SuspiciousStewMeta does not respect other values on PotionEffect #9749

@Machine-Maker

Description

@Machine-Maker

Expected behavior

The type used in SuspiciousStewMeta (PotionEffect) accurately conveys the information stored in the meta

Observed/Actual behavior

PotionEffect has 4 additional pieces of information that are not persisted in the itemstack nbt, only the type and duration are. This is not mentioned in the docs, but beyond that I don't think the use of PotionEffect is correct. See below.

Steps/models to reproduce

N/A

Plugin and Datapack List

N/A

Paper version

9624451

Other

I don't think adding documentation mentioning this is sufficient. I think deprecating existing methods with PotionEffect and using a separate type is appropriate. Whatever the solution is, the same thing should then be used for fixing the Mushroom Cow multiple effects API. That has the same issue. Perhaps the type can be an interface that PotionEffect extends or something, but usually the parameter type is an interface that best encapsulates the data being used and when PotionEffect is used elsewhere, all parts are used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions