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
Copy
import crafttweaker.neoforge.api.world.damage.DamageContainer;

Name: of

Return Type: DamageContainer

ZenScript
Copy
DamageContainer.of(source as DamageSource, originalDamage as float) as DamageContainer
ParameterType
Parameter
source
Type
DamageSource
Parameter
originalDamage
Type
float

Name: addModifier

ZenScript
Copy
DamageContainer.addModifier(type as DamageContainerReduction, reductionFunction as IReductionFunction)
ParameterType
Parameter
type
Type
DamageContainerReduction
Parameter
reductionFunction
Type
IReductionFunction

Name: getReduction

Return Type: float

ZenScript
Copy
DamageContainer.getReduction(type as DamageContainerReduction) as float
ParameterType
Parameter
type
Type
DamageContainerReduction
NameTypeHas GetterHas 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