An IPotion object refers a potion in the game.

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.potions.IPotion;

Getting an IPotion object

Link to getting-an-ipotion-object

You can get such an object through the use of the Potion Bracket handler

ZenScript
Copy
<potion:minecraft:strength>;
Zengetter功能返回值类型
Zengetter
name(名称)
功能
Returns the potion's internal name
返回值类型
string
Zengetter
badEffect
功能
Returns if the potion effect is bad
返回值类型
bool
Zengetter
liquidColor
功能
Returns the potion's color
返回值类型
int
Zengetter
liquidColour
功能
Returns the potion's colour
返回值类型
int
Zengetter
curativeItems
功能
Returns a list of all curative Items for the potion
返回值类型
List<IItemStack>
Zengetter
hasStatusIcon
功能
Returns whether the potion has a status icon
返回值类型
bool
Zengetter
isBeneficial
功能
Returns whether the potion is beneficial
返回值类型
bool
Zengetter
isInstant
功能
Returns whether the potion is instant
返回值类型
bool

Make PotionEffect

Link to make-potioneffect

An IPotionEffect is a Potion that has a duration and amplifier. You can use these two methods to get one from an IPotion:
As one might guess, both return an IPotionEffect object.

ZenScript
Copy
pot.makePotionEffect(int duration, int amplifier);
pot.makePotionEffect(int duration, int amplifier, boolean ambientEffect, boolean particlesShown);