Interface PotionContents


@NullMarked @Experimental @NonExtendable public interface PotionContents
Holds the contents of a potion (Potion, Splash Potion, Lingering Potion), or potion applied to a Tipped Arrow.
See Also:
  • Method Details

    • potionContents

      @Contract(value="-> new", pure=true) static PotionContents.Builder 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

      @Contract(pure=true) @Nullable Color 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

      @Contract(pure=true) @Unmodifiable List<PotionEffect> customEffects()
      Additional list of effect instances that this item should apply.
      Returns:
      effects
    • customName

      @Contract(pure=true) @Nullable String 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.