public interface ExplosionBuilder
Explosion
.Modifier and Type | Method and Description |
---|---|
Explosion |
build()
Attempts to create a
Explosion from the specified parameters. |
ExplosionBuilder |
canCauseFire(boolean fire)
Sets whether the affected blocks have a chance to catch on fire.
|
ExplosionBuilder |
origin(com.flowpowered.math.vector.Vector3d origin)
Sets the origin of the explosion.
|
ExplosionBuilder |
radius(float radius)
Sets the radius of the explosion.
|
ExplosionBuilder |
reset()
Resets this builder to a clean state.
|
ExplosionBuilder |
shouldBreakBlocks(boolean destroy)
Sets whether the affected blocks should be destroyed on explosion.
|
ExplosionBuilder |
sourceExplosive(Explosive source)
Sets the source explosive of the explosion.
|
ExplosionBuilder |
world(World world)
Sets the
World the explosion will occur in. |
ExplosionBuilder world(World world)
World
the explosion will occur in.world
- The worldExplosionBuilder sourceExplosive(@Nullable Explosive source)
source
- The source entityExplosionBuilder radius(float radius)
radius
- The radiusExplosionBuilder origin(com.flowpowered.math.vector.Vector3d origin)
origin
- The originExplosionBuilder canCauseFire(boolean fire)
fire
- Whether the affected blocks can catch on fireExplosionBuilder shouldBreakBlocks(boolean destroy)
destroy
- Whether the affected blocks should be destroyedExplosionBuilder reset()
Explosion build() throws IllegalArgumentException
Explosion
from the specified parameters.IllegalArgumentException
- If any builder parameter is invalid