Class ExplosionEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.ExplosionEvent
Direct Known Subclasses:
ExplosionEvent.Detonate, ExplosionEvent.Start, ExplosionKnockbackEvent

public abstract class ExplosionEvent extends net.neoforged.bus.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 ICancellableEvent.
ExplosionEvent.Detonate can modify the affected blocks and entities.
Children do not use
invalid reference
HasResult
.
Children of this event are fired on the NeoForge.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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.world.level.ServerExplosion
     
    private final net.minecraft.world.level.Level
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExplosionEvent(net.minecraft.world.level.Level level, net.minecraft.world.level.ServerExplosion explosion)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.ServerExplosion
     
    net.minecraft.world.level.Level
     

    Methods inherited from class java.lang.Object

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

    • level

      private final net.minecraft.world.level.Level level
    • explosion

      private final net.minecraft.world.level.ServerExplosion explosion
  • Constructor Details

    • ExplosionEvent

      public ExplosionEvent(net.minecraft.world.level.Level level, net.minecraft.world.level.ServerExplosion explosion)
  • Method Details

    • getLevel

      public net.minecraft.world.level.Level getLevel()
    • getExplosion

      public net.minecraft.world.level.ServerExplosion getExplosion()