Search in sources :

Example 1 with ExplosionConstructionEvent

use of resonant.api.explosion.ExplosionEvent.ExplosionConstructionEvent in project ICBM-Classic by BuiltBrokenModding.

the class Blast method explode.

/** All outside classes should call this. */
@Override
public void explode() {
    ExplosionConstructionEvent evt = new ExplosionConstructionEvent(this.world(), this);
    MinecraftForge.EVENT_BUS.post(evt);
    if (!evt.isCanceled()) {
        if (this.proceduralInterval() > 0) {
            if (!this.world().isRemote) {
                this.world().spawnEntityInWorld(new EntityExplosion(this));
            }
        } else {
            this.doPreExplode();
            this.doExplode();
            this.doPostExplode();
        }
    }
}
Also used : ExplosionConstructionEvent(resonant.api.explosion.ExplosionEvent.ExplosionConstructionEvent) EntityExplosion(icbm.classic.content.entity.EntityExplosion)

Aggregations

EntityExplosion (icbm.classic.content.entity.EntityExplosion)1 ExplosionConstructionEvent (resonant.api.explosion.ExplosionEvent.ExplosionConstructionEvent)1