DamageContainer

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.

script.zs
import crafttweaker.neoforge.api.world.damage.DamageContainer;

Members

addModifier(type as Reduction, reductionFunction as IReductionFunction)
script.zs
// DamageContainer.addModifier(type as Reduction, reductionFunction as IReductionFunction);
myDamageContainer.addModifier(myReduction, myIReductionFunction);
Getter
script.zs
// DamageContainer.blockedDamage as float
myDamageContainer.blockedDamage

Return Type: float

getReduction(type as Reduction) as float
script.zs
// DamageContainer.getReduction(type as Reduction) as float;
myDamageContainer.getReduction(myReduction);

Return Type: float

Getter
script.zs
// DamageContainer.newDamage as float
myDamageContainer.newDamage

Return Type: float

Setter
script.zs
// DamageContainer.newDamage = (damage as float);
myDamageContainer.newDamage = myFloat;

Parameters:

damage Type: float
static of(source as DamageSource, originalDamage as float) as DamageContainer
script.zs
// DamageContainer.of(source as DamageSource, originalDamage as float) as DamageContainer;
DamageContainer.of(myDamageSource, myFloat);

Parameters:

source Type: DamageSource
originalDamage Type: float

Return Type: DamageContainer

Getter
script.zs
// DamageContainer.originalDamage as float
myDamageContainer.originalDamage

Return Type: float

Getter
script.zs
// DamageContainer.postAttackInvulnerabilityTicks as int
myDamageContainer.postAttackInvulnerabilityTicks

Return Type: int

Setter
script.zs
// DamageContainer.postAttackInvulnerabilityTicks = (ticks as int);
myDamageContainer.postAttackInvulnerabilityTicks = myInt;

Parameters:

ticks Type: int
Getter
script.zs
// DamageContainer.shieldDamage as float
myDamageContainer.shieldDamage

Return Type: float

Getter
script.zs
// DamageContainer.source as DamageSource
myDamageContainer.source

Return Type: DamageSource