Class ExplosionEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.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 level.

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 level, Explosion explosion)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     

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

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

    Methods inherited from class java.lang.Object

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

    • level

      private final Level level
    • explosion

      private final Explosion explosion
  • Constructor Details

    • ExplosionEvent

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

    • getLevel

      public Level getLevel()
    • getExplosion

      public Explosion getExplosion()