Uses of Class
net.neoforged.neoforge.common.damagesource.DamageContainer
Packages that use DamageContainer
Package
Description
-
Uses of DamageContainer in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common with parameters of type DamageContainerModifier and TypeMethodDescriptionstatic LivingShieldBlockEvent
CommonHooks.onDamageBlock
(net.minecraft.world.entity.LivingEntity blocker, DamageContainer container, float blockedDamage, boolean originalBlocked) Creates, posts, and returns aLivingShieldBlockEvent
.static boolean
CommonHooks.onEntityIncomingDamage
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container) Called after invulnerability checks inEntity.hurt(DamageSource, float)
, this method creates and posts the first event in the LivingEntity damage sequence,LivingIncomingDamageEvent
.static void
CommonHooks.onLivingDamagePost
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container) Creates and posts aLivingDamageEvent.Post
.static float
CommonHooks.onLivingDamagePre
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container) Creates and posts anLivingDamageEvent.Pre
. -
Uses of DamageContainer in net.neoforged.neoforge.common.damagesource
Methods in net.neoforged.neoforge.common.damagesource with parameters of type DamageContainerModifier and TypeMethodDescriptionfloat
IReductionFunction.modify
(DamageContainer container, float reductionIn) Consumes an existing reduction value and produces a modified value. -
Uses of DamageContainer in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type DamageContainerModifier and TypeMethodDescriptiondefault void
ILivingEntityExtension.onDamageTaken
(DamageContainer damageContainer) Executes inEntity.hurt(DamageSource, float)
after all damage and effects have applied. -
Uses of DamageContainer in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as DamageContainerModifier and TypeFieldDescriptionprivate final DamageContainer
LivingDamageEvent.Pre.container
private final DamageContainer
LivingIncomingDamageEvent.container
private final DamageContainer
LivingShieldBlockEvent.container
Methods in net.neoforged.neoforge.event.entity.living that return DamageContainerModifier and TypeMethodDescriptionLivingDamageEvent.Pre.getContainer()
Returns theDamageContainer
instance for this damage sequence.LivingIncomingDamageEvent.getContainer()
Returns the container for this damage sequence.LivingShieldBlockEvent.getDamageContainer()
Constructors in net.neoforged.neoforge.event.entity.living with parameters of type DamageContainerModifierConstructorDescriptionLivingIncomingDamageEvent
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container) LivingShieldBlockEvent
(net.minecraft.world.entity.LivingEntity blocker, DamageContainer container, float blockedDamage, boolean originalBlockedState) Post
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container) Pre
(net.minecraft.world.entity.LivingEntity entity, DamageContainer container)