DamageType
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.world.damage.DamageType;
Constructors
new(msgId as string, scaling as DamageScaling, exhaustion as float, effects as DamageEffects, deathMessageType as DeathMessageType)
Creates a new DamageType using the provided valuesscript.zs
// new DamageType(msgId as string, scaling as DamageScaling, exhaustion as float, effects as DamageEffects, deathMessageType as DeathMessageType);new DamageType(myString, myDamageScaling, myFloat, myDamageEffects, myDeathMessageType);
Parameters:
msgId: string
Type: string
- The unlocalized name of this type exhaustion: float
Type: float
- How much exhaustion does this type cause new(msgId as string, scaling as DamageScaling, exhaustion as float)
Creates a new DamageType using the provided valuesscript.zs
new DamageType(myString, myDamageScaling, myFloat);
Parameters:
msgId: string
Type: string
- The unlocalized name of this type exhaustion: float
Type: float
- How much exhaustion does this type cause new(msgId as string, scaling as DamageScaling, exhaustion as float, effects as DamageEffects)
Creates a new DamageType using the provided valuesscript.zs
// new DamageType(msgId as string, scaling as DamageScaling, exhaustion as float, effects as DamageEffects);new DamageType(myString, myDamageScaling, myFloat, myDamageEffects);
Parameters:
msgId: string
Type: string
- The unlocalized name of this type exhaustion: float
Type: float
- How much exhaustion does this type cause new(msgId as string, exhaustion as float, effects as DamageEffects)
Creates a new DamageType using the provided valuesscript.zs
new DamageType(myString, myFloat, myDamageEffects);
Parameters:
msgId: string
Type: string
- The unlocalized name of this type exhaustion: float
Type: float
- How much exhaustion does this type cause new(msgId as string, exhaustion as float)
Creates a new DamageType using the provided valuesscript.zs
// new DamageType(msgId as string, exhaustion as float);new DamageType(myString, myFloat);
Parameters:
msgId: string
Type: string
- The unlocalized name of this type exhaustion: float
Type: float
- How much exhaustion does this type cause Members
Getter
// DamageType.deathMessageType as DeathMessageTypemyDamageType.deathMessageType
Return Type:
DeathMessageType
Getter
// DamageType.effects as DamageEffectsmyDamageType.effects
Return Type:
DamageEffects
Getter
// DamageType.exhaustion as floatmyDamageType.exhaustion
Return Type:
float
Getter
// DamageType.msgId as stringmyDamageType.msgId
Return Type:
string
Getter
// DamageType.scaling as DamageScalingmyDamageType.scaling
Return Type:
DamageScaling