LivingPostDamageEvent

Link to livingpostdamageevent

The event is not cancelable.

The event does not have a result.

Importing the class

Link to importing-the-class

Importing the class is recommended for events, simply add this line to the top of your script file.

ZenScript
Copy
import crafttweaker.neoforge.api.event.entity.living.LivingPostDamageEvent;

Listening to the event

Link to listening-to-the-event

ZenScript
Copy
events.register<crafttweaker.neoforge.api.event.entity.living.LivingPostDamageEvent>(event => {
    println("LivingPostDamageEvent ran!");
});

LivingPostDamageEvent extends LivingDamageEvent. That means all methods available in LivingDamageEvent are also available in LivingPostDamageEvent

Name: getReduction

Return Type: float

ZenScript
Copy
LivingPostDamageEvent.getReduction(reduction as DamageContainerReduction) as float
ParameterType
Parameter
reduction
Type
DamageContainerReduction
NameTypeHas GetterHas Setter
Name
blockedDamage
Type
float
Has Getter
true
Has Setter
false
Name
newDamage
Type
float
Has Getter
true
Has Setter
false
Name
originalDamage
Type
float
Has Getter
true
Has Setter
false
Name
postAttackInvulnerabilityTicks
Type
int
Has Getter
true
Has Setter
false
Name
shieldDamage
Type
float
Has Getter
true
Has Setter
false
Name
source
Type
DamageSource
Has Getter
true
Has Setter
false