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 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.
  • Field Details

  • Constructor Details

    • EntityStruckByLightningEvent

      public EntityStruckByLightningEvent(Entity entity, LightningBolt lightning)
  • Method Details