Class ExplosionKnockbackEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.ExplosionEvent
net.neoforged.neoforge.event.level.ExplosionKnockbackEvent
ExplosionKnockbackEvent is fired once the explosion has calculated the knockback velocity to add to the entity caught in blast.
This event is not
This event is fired on the
This event is not
ICancellableEvent.This event is fired on the
NeoForge.EVENT_BUS.-
Nested Class Summary
Nested classes/interfaces inherited from class ExplosionEvent
ExplosionEvent.Detonate, ExplosionEvent.Start -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExplosionKnockbackEvent(Level level, ServerExplosion explosion, Entity entity, Vec3 knockbackVelocity, List<BlockPos> blockList) -
Method Summary
Modifier and TypeMethodDescriptionreturn the list of blocks affected by the explosion.return the entity affected by the explosion knockback.return the explosion knockback velocity to apply to entity.voidsetKnockbackVelocity(Vec3 newKnockbackVelocity) Sets the explosion knockback velocity to add to the entity's existing velocity.Methods inherited from class ExplosionEvent
getExplosion, getLevel
-
Field Details
-
entity
-
blockList
-
knockbackVelocity
-
-
Constructor Details
-
ExplosionKnockbackEvent
-
-
Method Details
-
getAffectedBlocks
-
getAffectedEntity
return the entity affected by the explosion knockback. -
getKnockbackVelocity
return the explosion knockback velocity to apply to entity. -
setKnockbackVelocity
Sets the explosion knockback velocity to add to the entity's existing velocity.
-