MobEffectInstance
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.
import crafttweaker.api.entity.effect.MobEffectInstance;
Implemented Interfaces
MobEffectInstance implements the following interfaces. That means all methods defined in these interfaces are also available in MobEffectInstance
- Comparable<MobEffectInstance>
Static Methods
Return Type: MobEffectInstance
MobEffectInstance.load(data as MapData) as MobEffectInstance
Parameter | Type | Description |
---|---|---|
Parameter data | Type MapData | Description No Description Provided |
Methods
Return Type: void
MobEffectInstance.applyEffect(entity as LivingEntity) as void
Parameter | Type | Description |
---|---|---|
Parameter entity | Type LivingEntity | Description No Description Provided |
Return Type: int
MobEffectInstance.compareTo(other as MobEffectInstance) as int
Parameter | Type | Description |
---|---|---|
Parameter other | Type MobEffectInstance | Description No Description Provided |
Return Type: int
// MobEffectInstance.getAmplifier() as int
myMobEffectInstance.getAmplifier();
Return Type: string
// MobEffectInstance.getDescriptionId() as string
myMobEffectInstance.getDescriptionId();
Return Type: int
// MobEffectInstance.getDuration() as int
myMobEffectInstance.getDuration();
Return Type: MobEffect
// MobEffectInstance.getEffect() as MobEffect
myMobEffectInstance.getEffect();
Return Type: boolean
// MobEffectInstance.isAmbient() as boolean
myMobEffectInstance.isAmbient();
Return Type: boolean
// MobEffectInstance.isNoCounter() as boolean
myMobEffectInstance.isNoCounter();
Return Type: boolean
// MobEffectInstance.isVisible() as boolean
myMobEffectInstance.isVisible();
Return Type: void
MobEffectInstance.setNoCounter(noCounter as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter noCounter | Type boolean | Description No Description Provided |
Return Type: boolean
// MobEffectInstance.showIcon() as boolean
myMobEffectInstance.showIcon();
Return Type: boolean
MobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable) as boolean
Parameter | Type | Description | Optional | DefaultValue |
---|---|---|---|---|
Parameter entity | Type LivingEntity | Description No Description Provided | Optional false | DefaultValue |
Parameter onFinish | Type Runnable | Description No Description Provided | Optional true | DefaultValue () => {} |
Return Type: boolean
MobEffectInstance.update(instance as MobEffectInstance) as boolean
Parameter | Type | Description |
---|---|---|
Parameter instance | Type MobEffectInstance | Description No Description Provided |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name ambient | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name amplifier | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name descriptionId | Type string | Has Getter true | Has Setter false | Description No Description Provided |
Name duration | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name effect | Type MobEffect | Has Getter true | Has Setter false | Description No Description Provided |
Name isNoCounter | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name showIcon | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name visible | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |