Package net.minecraftforge.event.entity
Class EntityStruckByLightningEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.EntityStruckByLightningEvent
-
public class EntityStruckByLightningEvent extends EntityEvent
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 inEntityLightningBolt#onUpdate()
viaForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt)
.
lightning
contains the instance of EntityLightningBolt attempting to strike an entity.
This event isCancelable
.
If this event is canceled, the Entity is not struck by the lightening.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private LightningBoltEntity
lightning
-
Constructor Summary
Constructors Constructor Description EntityStruckByLightningEvent(Entity entity, LightningBoltEntity lightning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LightningBoltEntity
getLightning()
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
lightning
private final LightningBoltEntity lightning
-
-
Constructor Detail
-
EntityStruckByLightningEvent
public EntityStruckByLightningEvent(Entity entity, LightningBoltEntity lightning)
-
-
Method Detail
-
getLightning
public LightningBoltEntity getLightning()
-
-