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.
Expected behavior
The type used in SuspiciousStewMeta (
PotionEffect) accurately conveys the information stored in the metaObserved/Actual behavior
PotionEffecthas 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
PotionEffectis used elsewhere, all parts are used.