IPotion
Link to ipotion
An IPotion object refers a potion in the game.
Dieses Paket importieren
Link to dieses-paket-importieren
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
Link to zengetter
ZenGetter | What does it do | Rückgabetyp |
---|---|---|
ZenGetter name | What does it do Returns the potion's internal name | Rückgabetyp string |
ZenGetter badEffect | What does it do Returns if the potion effect is bad | Rückgabetyp bool |
ZenGetter liquidColor | What does it do Returns the potion's color | Rückgabetyp int |
ZenGetter liquidColour | What does it do Returns the potion's colour | Rückgabetyp int |
ZenGetter curativeItems | What does it do Returns a list of all curative Items for the potion | Rückgabetyp List<IItemStack> |
ZenGetter hasStatusIcon | What does it do Returns whether the potion has a status icon | Rückgabetyp bool |
ZenGetter isBeneficial | What does it do Returns whether the potion is beneficial | Rückgabetyp bool |
ZenGetter isInstant | What does it do Returns whether the potion is instant | Rückgabetyp bool |
ZenMethods
Link to zenmethods
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 Copypot.makePotionEffect(int duration, int amplifier);
pot.makePotionEffect(int duration, int amplifier, boolean ambientEffect, boolean particlesShown);