InstantenousMobEffect
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.entity.effect.InstantenousMobEffect;
Extends
InstantenousMobEffect extends MobEffect
.
Implements
Undocumented Interfaces
FeatureElement
,IMobEffectExtension
Members
Returns: The effect with the added modifier.
// InstantenousMobEffect.addAttributeModifier(attribute as Attribute, id as ResourceLocation, value as double, operation as AttributeOperation) as MobEffect;myInstantenousMobEffect.addAttributeModifier(myAttribute, myResourceLocation, myDouble, myOperation);
Parameters:
value: double
Type: double
- The value of the modifier.
Return Type:
MobEffect
myInstantenousMobEffect.applyEffectTick(myLivingEntity, myInt);
Parameters:
amplifier: int
Type: int
- The amplifier of the effect. // InstantenousMobEffect.applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double);myInstantenousMobEffect.applyInstantenousEffect(myEntity, myEntity, myLivingEntity, myInt, myDouble);
Parameters:
amplifier: int
Type: int
- The amplifier of the effect. effectiveness: double
Type: double
- The effectiveness of the effect. // InstantenousMobEffect.beneficial as boolmyInstantenousMobEffect.beneficial
Return Type:
bool
Returns: True if the effect is beneficial, false otherwise.
// InstantenousMobEffect.beneficial() as bool;myInstantenousMobEffect.beneficial();
Return Type:
bool
MobEffectCategory
of the effect.// InstantenousMobEffect.category as MobEffectCategorymyInstantenousMobEffect.category
Return Type:
MobEffectCategory
MobEffectCategory
of the effect.Returns: The MobEffectCategory
of the effect.
myInstantenousMobEffect.category();
Return Type:
MobEffectCategory
// InstantenousMobEffect.color as intmyInstantenousMobEffect.color
Return Type:
int
Returns: The color of the effect.
// InstantenousMobEffect.color() as int;myInstantenousMobEffect.color();
Return Type:
int
// InstantenousMobEffect.commandString as stringmyInstantenousMobEffect.commandString
Return Type:
string
Returns: The command string of the effect.
// InstantenousMobEffect.commandString() as string;myInstantenousMobEffect.commandString();
Return Type:
string
// InstantenousMobEffect.descriptionId as stringmyInstantenousMobEffect.descriptionId
Return Type:
string
Returns: The description ID of the effect.
// InstantenousMobEffect.descriptionId() as string;myInstantenousMobEffect.descriptionId();
Return Type:
string
AttributeModifier
that this effect adds with the given amplifier.Returns: The AttributeModifier
that this effect adds with the given amplifier.
myInstantenousMobEffect.getAttributeModifiers(myInt);
Parameters:
amplifier: int
Type: int
- The amplifier of the effect.
Return Type:
AttributeModifier[Attribute]
// InstantenousMobEffect.instantenous as boolmyInstantenousMobEffect.instantenous
Return Type:
bool
Returns: True if the effect is instantenous, false otherwise.
// InstantenousMobEffect.instantenous() as bool;myInstantenousMobEffect.instantenous();
Return Type:
bool
// InstantenousMobEffect.registryName as ResourceLocationmyInstantenousMobEffect.registryName
Return Type:
ResourceLocation
Returns: The registry name of the effect.
myInstantenousMobEffect.registryName();
Return Type:
ResourceLocation
Returns: True if the effect should be applied this tick, false otherwise.
// InstantenousMobEffect.shouldApplyEffectTickThisTick(duration as int, amplifier as int) as bool;myInstantenousMobEffect.shouldApplyEffectTickThisTick(myInt, myInt);
Parameters:
duration: int
Type: int
- The duration of the effect. amplifier: int
Type: int
- The amplifier of the effect.
Return Type:
bool