Script API - v1.26.20
    Preparing search index...

    Used for accessing all potion effect types, delivery types, and creating potions.

    export class Potions {
    private constructor();
    static getAllDeliveryTypes(): PotionDeliveryType[];
    static getAllEffectTypes(): PotionEffectType[];
    static getDeliveryType(potionDeliveryId: string): PotionDeliveryType | undefined;
    static getEffectType(potionEffectId: string): PotionEffectType | undefined;
    static resolve(
    potionEffectType: PotionEffectType | string,
    potionDeliveryType: PotionDeliveryType | string,
    ): ItemStack;
    }
    Index

    Constructors

    Methods

    • Parameters

      • potionDeliveryId: string

      Returns PotionDeliveryType | undefined

      A type handle wrapping the valid delivery id, or undefined for an invalid delivery id.

      Retrieves a type handle for a specified potion delivery id.

      This function can't be called in early-execution mode.

    • Parameters

      • potionEffectId: string

        A valid potion effect id. See @minecraft/vanilla-data.MinecraftPotionEffectTypes

      Returns PotionEffectType | undefined

      A type handle wrapping the valid effect id, or undefined for an invalid effect id.

      Retrieves a type handle for a specified potion effect id.

      This function can't be called in early-execution mode.