IPotion
Link to ipotion
An IPotion object refers a potion in the game.
패키지 임포트하기
Link to 패키지-임포트하기
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>;
Zengetters
Link to zengetters
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 |
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);