PotionContents
Link to potioncontents
Importing the class
Link to importing-the-class
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 at the very top of the file.
ZenScript Copyimport crafttweaker.api.item.component.PotionContents;
Extending Record
Link to extending-record
PotionContents extends Record. That means all methods available in Record are also available in PotionContents
Static Methods
Link to static-methods
Name: of
Return Type: PotionContents
ZenScript CopyPotionContents.of(potion as Potion) as PotionContents
Parameter | Type |
---|---|
Parameter potion | Type Potion |
Name: of
Return Type: PotionContents
ZenScript CopyPotionContents.of(potion as Potion, customColour as int, customEffects as stdlib.List<MobEffectInstance>) as PotionContents
Parameter | Type |
---|---|
Parameter potion | Type Potion |
Parameter customColour | Type int |
Parameter customEffects | Type stdlib.List<MobEffectInstance> |
Methods
Link to methods
Name: withEffectAdded
Return Type: PotionContents
ZenScript CopyPotionContents.withEffectAdded(effectInstance as MobEffectInstance) as PotionContents
Parameter | Type |
---|---|
Parameter effectInstance | Type MobEffectInstance |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name color | Type int | Has Getter true | Has Setter false |
Name customEffects | Type stdlib.List<MobEffectInstance> | Has Getter true | Has Setter false |
Name hasEffects | Type boolean | Has Getter true | Has Setter false |