Interface: ExplosionOptions
Additional configuration options for the Dimension.createExplosion method.
Example
// Creates an explosion of radius 15 that does not break blocks
import { DimensionLocation } from '@minecraft/server';
function createExplosions(location: DimensionLocation) {
// Creates an explosion of radius 15 that does not break blocks
location.dimension.createExplosion(location, 15, { breaksBlocks: false });
// Creates an explosion of radius 15 that does not cause fire
location.dimension.createExplosion(location, 15, { causesFire: true });
// Creates an explosion of radius 10 that can go underwater
location.dimension.createExplosion(location, 10, { allowUnderwater: true });
}
Properties
allowUnderwater?
optional
allowUnderwater:boolean
Remarks
Whether parts of the explosion also impact underwater.
breaksBlocks?
optional
breaksBlocks:boolean
Remarks
Whether the explosion will break blocks within the blast radius.
causesFire?
optional
causesFire:boolean
Remarks
If true, the explosion is accompanied by fires within or near the blast radius.
source?
optional
source:Entity
Remarks
Optional source of the explosion.