Class EntityStruckByLightningEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.EntityStruckByLightningEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class EntityStruckByLightningEvent
extends EntityEvent
implements net.neoforged.bus.api.ICancellableEvent
EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.
This event is fired whenever an EntityLightningBolt is updated to strike an Entity in
This event is
If this event is canceled, the Entity is not struck by the lightening.
This event does not have a result.
This event is fired on the
This event is fired whenever an EntityLightningBolt is updated to strike an Entity in
LightningBolt.tick()
via EventHooks.onEntityStruckByLightning(Entity, LightningBolt)
.lightning
contains the instance of EntityLightningBolt attempting to strike an entity.This event is
ICancellableEvent
.If this event is canceled, the Entity is not struck by the lightening.
This event does not have a result.
invalid reference
HasResult
This event is fired on the
NeoForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.EntityEvent
getEntity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
lightning
-
-
Constructor Details
-
EntityStruckByLightningEvent
-
-
Method Details
-
getLightning
-