Potions Class
Caution
This class is still in pre-release. Its signature may change or it may be removed in future releases.
Used for accessing all potion effects, liquids, and modifiers currently available for use within the world.
Methods
getPotionEffectType
static getPotionEffectType(potionEffectId: string): PotionEffectType | undefined
Retrieves a type handle for a specified potion effect id.
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.
getPotionLiquidType
static getPotionLiquidType(potionLiquidId: string): PotionLiquidType | undefined
Retrieves a type handle for a specified potion liquid id.
Parameters
- potionLiquidId: string
Returns PotionLiquidType | undefined - A type handle wrapping the valid liquid id, or undefined for an invalid liquid id.
getPotionModifierType
static getPotionModifierType(potionModifierId: string): PotionModifierType | undefined
Retrieves a type handle for a specified potion modifier id.
Parameters
- potionModifierId: string
Returns PotionModifierType | undefined - A type handle wrapping the valid modifier id, or undefined for an invalid modifier id.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for