PotionContents
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.item.component.PotionContents;
Members
Getter
// PotionContents.color as intmyPotionContents.color
Return Type:
int
Getter
myPotionContents.customEffects
Return Type:
List<MobEffectInstance>
Getter
// PotionContents.hasEffects as boolmyPotionContents.hasEffects
Return Type:
bool
static of(potion as Potion, customColour as int, customEffects as List<MobEffectInstance>) as PotionContents
// PotionContents.of(potion as Potion, customColour as int, customEffects as List<MobEffectInstance>) as PotionContents;PotionContents.of(myPotion, myInt, myList);
Parameters:
customColour: int
Type: int
customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
Return Type:
PotionContents
static of(potion as Potion) as PotionContents
PotionContents.of(myPotion);
Return Type:
PotionContents
withEffectAdded(effectInstance as MobEffectInstance) as PotionContents
myPotionContents.withEffectAdded(myMobEffectInstance);
Parameters:
effectInstance: MobEffectInstance
Type: MobEffectInstance
Return Type:
PotionContents