MobEffectInstance
Link to mobeffectinstance
Diese Klasse importieren
Link to diese-klasse-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 at the very top of the file.
ZenScript Copyimport crafttweaker.api.entity.effect.MobEffectInstance;
Implemented Interfaces
Link to implemented-interfaces
MobEffectInstance implements the following interfaces. That means all methods defined in these interfaces are also available in MobEffectInstance
- Comparable<MobEffectInstance>
Static Methods
Link to static-methods
Name: load
Return Type: MobEffectInstance
ZenScript CopyMobEffectInstance.load(data as MapData) as MobEffectInstance
Parameter | Type |
---|---|
Parameter data | Type MapData |
Constructors
Link to constructors
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>);
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect, duration as int) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100);
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
Parameter duration | Type int |
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2);
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
Parameter duration | Type int |
Parameter amplifier | Type int |
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false);
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
Parameter duration | Type int |
Parameter amplifier | Type int |
Parameter ambient | Type boolean |
Parameter visible | Type boolean |
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean, showIcon as boolean) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false, false);
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
Parameter duration | Type int |
Parameter amplifier | Type int |
Parameter ambient | Type boolean |
Parameter visible | Type boolean |
Parameter showIcon | Type boolean |
ZenScript Copynew MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean, showIcon as boolean, hiddenEffect as MobEffectInstance) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false, false, new MobEffectInstance(<mobeffect:minecraft:haste>, 200, 3));
Parameter | Type |
---|---|
Parameter mobEffect | Type MobEffect |
Parameter duration | Type int |
Parameter amplifier | Type int |
Parameter ambient | Type boolean |
Parameter visible | Type boolean |
Parameter showIcon | Type boolean |
Parameter hiddenEffect | Type MobEffectInstance |
Methoden
Link to methoden
Name: applyEffect
ZenScript CopyMobEffectInstance.applyEffect(entity as LivingEntity)
Parameter | Type |
---|---|
Parameter entity | Type LivingEntity |
Name: compareTo
Return Type: int
ZenScript CopyMobEffectInstance.compareTo(other as MobEffectInstance) as int
Parameter | Type |
---|---|
Parameter other | Type MobEffectInstance |
Name: getAmplifier
Return Type: int
ZenScript Copy// MobEffectInstance.getAmplifier() as int
myMobEffectInstance.getAmplifier();
Name: getDescriptionId
Return Type: string
ZenScript Copy// MobEffectInstance.getDescriptionId() as string
myMobEffectInstance.getDescriptionId();
Name: getDuration
Return Type: int
ZenScript Copy// MobEffectInstance.getDuration() as int
myMobEffectInstance.getDuration();
Name: getEffect
Return Type: MobEffect
ZenScript Copy// MobEffectInstance.getEffect() as MobEffect
myMobEffectInstance.getEffect();
Name: isAmbient
Return Type: boolean
ZenScript Copy// MobEffectInstance.isAmbient() as boolean
myMobEffectInstance.isAmbient();
Name: isNoCounter
Return Type: boolean
ZenScript Copy// MobEffectInstance.isNoCounter() as boolean
myMobEffectInstance.isNoCounter();
Name: isVisible
Return Type: boolean
ZenScript Copy// MobEffectInstance.isVisible() as boolean
myMobEffectInstance.isVisible();
Name: setNoCounter
ZenScript CopyMobEffectInstance.setNoCounter(noCounter as boolean)
Parameter | Type |
---|---|
Parameter noCounter | Type boolean |
Name: showIcon
Return Type: boolean
ZenScript Copy// MobEffectInstance.showIcon() as boolean
myMobEffectInstance.showIcon();
Name: tick
Return Type: boolean
ZenScript CopyMobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable?) as boolean
Parameter | Type | Optional | Standardwert |
---|---|---|---|
Parameter entity | Type LivingEntity | Optional false | Standardwert |
Parameter onFinish | Type Runnable? | Optional true | Standardwert null |
Name: update
Return Type: boolean
ZenScript CopyMobEffectInstance.update(instance as MobEffectInstance) as boolean
Parameter | Type |
---|---|
Parameter instance | Type MobEffectInstance |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name ambient | Type boolean | Has Getter true | Has Setter false |
Name amplifier | Type int | Has Getter true | Has Setter false |
Name descriptionId | Type string | Has Getter true | Has Setter false |
Name duration | Type int | Has Getter true | Has Setter false |
Name effect | Type MobEffect | Has Getter true | Has Setter false |
Name isNoCounter | Type boolean | Has Getter true | Has Setter false |
Name showIcon | Type boolean | Has Getter true | Has Setter false |
Name visible | Type boolean | Has Getter true | Has Setter false |