Class ExplosionEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.ExplosionEvent
Direct Known Subclasses:
ExplosionEvent.Detonate, ExplosionEvent.Start

public class ExplosionEvent extends net.minecraftforge.eventbus.api.Event
ExplosionEvent triggers when an explosion happens in the world.

ExplosionEvent.Start is fired before the explosion actually occurs.
ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.

ExplosionEvent.Start is Cancelable.
ExplosionEvent.Detonate can modify the affected blocks and entities.
Children do not use Event.HasResult.
Children of this event are fired on the MinecraftForge.EVENT_BUS.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.
    static class 
    ExplosionEvent.Start is fired before the explosion actually occurs.

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Explosion
     
    private final Level
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExplosionEvent(Level world, Explosion explosion)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • world

      private final Level world
    • explosion

      private final Explosion explosion
  • Constructor Details

    • ExplosionEvent

      public ExplosionEvent(Level world, Explosion explosion)
  • Method Details

    • getWorld

      public Level getWorld()
    • getExplosion

      public Explosion getExplosion()