Interface PotionContents
Holds the contents of a potion (Potion, Splash Potion, Lingering Potion), or potion applied to a Tipped Arrow.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAll effects that this component applies.Computes the effective colour of this potion contents component.Overrides the visual color of the potion.Additional list of effect instances that this item should apply.Suffix to the translation key of the potion item.potion()
The potion type in this item: the item will inherit all effects from this.static PotionContents.Builder
-
Method Details
-
potionContents
-
potion
The potion type in this item: the item will inherit all effects from this.- Returns:
- potion type, or
null
if not present
-
customColor
Overrides the visual color of the potion.- Returns:
- color override, or
null
if not present - API Note:
- alpha channel of the color is only relevant for Tipped Arrow
-
customEffects
Additional list of effect instances that this item should apply.- Returns:
- effects
-
customName
Suffix to the translation key of the potion item.- Returns:
- translation key suffix, or
null
if not present - API Note:
- This is used in the display of tipped arrow and potion items.
-
allEffects
All effects that this component applies.This is a combination of the base potion type and any custom effects.
- Returns:
- an unmodifiable list of all effects.
-
computeEffectiveColor
Computes the effective colour of this potion contents component.This blends all custom effects, or uses a default fallback colour. It may or may not have an alpha channel, used for tipped arrows.
- Returns:
- the effective colour this component would display with.
-