DamageContainer
Link to damagecontainer
Importing the class
Link to importing-the-class
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.neoforge.api.world.damage.DamageContainer;
Static Methods
Link to static-methods
Name: of
Return Type: DamageContainer
ZenScript CopyDamageContainer.of(source as DamageSource, originalDamage as float) as DamageContainer
Parameter | Type |
---|---|
Parameter source | Type DamageSource |
Parameter originalDamage | Type float |
Methods
Link to methods
Name: addModifier
ZenScript CopyDamageContainer.addModifier(type as DamageContainerReduction, reductionFunction as IReductionFunction)
Parameter | Type |
---|---|
Parameter type | Type DamageContainerReduction |
Parameter reductionFunction | Type IReductionFunction |
Name: getReduction
Return Type: float
ZenScript CopyDamageContainer.getReduction(type as DamageContainerReduction) as float
Parameter | Type |
---|---|
Parameter type | Type DamageContainerReduction |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name blockedDamage | Type float | Has Getter true | Has Setter false |
Name newDamage | Type float | Has Getter true | Has Setter true |
Name originalDamage | Type float | Has Getter true | Has Setter false |
Name postAttackInvulnerabilityTicks | Type int | Has Getter true | Has Setter true |
Name shieldDamage | Type float | Has Getter true | Has Setter false |
Name source | Type DamageSource | Has Getter true | Has Setter false |