MobEffectInstance

Link to mobeffectinstance

Импорт класса

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 at the very top of the file.

ZenScript
Copy
import 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

Name: load

Return Type: MobEffectInstance

ZenScript
Copy
MobEffectInstance.load(data as MapData) as MobEffectInstance
ПараметрТипОписание
Параметр
data
Тип
MapData
Описание
No Description Provided

Name: applyEffect

Return Type: void

ZenScript
Copy
MobEffectInstance.applyEffect(entity as LivingEntity) as void
ПараметрТипОписание
Параметр
entity
Тип
LivingEntity
Описание
No Description Provided

Name: compareTo

Return Type: int

ZenScript
Copy
MobEffectInstance.compareTo(other as MobEffectInstance) as int
ПараметрТипОписание
Параметр
other
Тип
MobEffectInstance
Описание
No Description Provided

Name: getAmplifier

Return Type: int

ZenScript
Copy
// MobEffectInstance.getAmplifier() as int

myMobEffectInstance.getAmplifier();

Link to getDescriptionId

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: save

Return Type: MapData

ZenScript
Copy
MobEffectInstance.save(data as MapData) as MapData
ПараметрТипОписаниеOptionalDefaultValue
Параметр
data
Тип
MapData
Описание
No Description Provided
Optional
true
DefaultValue

Name: setNoCounter

Return Type: void

ZenScript
Copy
MobEffectInstance.setNoCounter(noCounter as boolean) as void
ПараметрТипОписание
Параметр
noCounter
Тип
boolean
Описание
No Description Provided

Name: showIcon

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.showIcon() as boolean

myMobEffectInstance.showIcon();

Name: tick

Return Type: boolean

ZenScript
Copy
MobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable) as boolean
ПараметрТипОписаниеOptionalDefaultValue
Параметр
entity
Тип
LivingEntity
Описание
No Description Provided
Optional
false
DefaultValue
Параметр
onFinish
Тип
Runnable
Описание
No Description Provided
Optional
true
DefaultValue
() => {}

Name: update

Return Type: boolean

ZenScript
Copy
MobEffectInstance.update(instance as MobEffectInstance) as boolean
ПараметрТипОписание
Параметр
instance
Тип
MobEffectInstance
Описание
No Description Provided

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
ambient
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
amplifier
Тип
int
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
descriptionId
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
duration
Тип
int
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
effect
Тип
MobEffect
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
isNoCounter
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
showIcon
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
visible
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided