Class 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
      ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.
      static class  ExplosionEvent.Start
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Explosion getExplosion()  
      World getWorld()  
      • 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 Detail

      • world

        private final World world
      • explosion

        private final Explosion explosion
    • Constructor Detail

      • ExplosionEvent

        public ExplosionEvent​(World world,
                              Explosion explosion)
    • Method Detail

      • getWorld

        public World getWorld()
      • getExplosion

        public Explosion getExplosion()