Modifier and Type | Interface and Description |
---|---|
static interface |
Explosion.Builder
A builder for
Explosion . |
Modifier and Type | Method and Description |
---|---|
static Explosion.Builder |
builder()
Creates a new
Explosion.Builder to build a Explosion . |
boolean |
canCauseFire()
Gets whether the affected blocks have a chance to catch on fire.
|
default double |
getKnockback()
Gets the relative strength of the knockback applied to nearby
objects that can be knocked back.
|
float |
getRadius()
Gets the radius of the explosion.
|
default float |
getRandomness()
Gets an indication of the randomness of the form of the explosion.
|
default int |
getResolution()
Gets a value that indicates the relative strength of an explosion.
|
Optional<Explosive> |
getSourceExplosive()
Gets the source
Explosive of the explosion. |
boolean |
shouldBreakBlocks()
Gets whether the affected blocks should be destroyed on explosion.
|
boolean |
shouldDamageEntities()
Gets whether this explosion will damage entities.
|
boolean |
shouldPlaySmoke()
Gets whether the explosion will play a smoke effect.
|
getLocation, getWorld
static Explosion.Builder builder()
Explosion.Builder
to build a Explosion
.Optional<Explosive> getSourceExplosive()
Explosive
of the explosion.float getRadius()
boolean canCauseFire()
boolean shouldPlaySmoke()
boolean shouldBreakBlocks()
boolean shouldDamageEntities()
default int getResolution()
default float getRandomness()
This value indicates how close to being symmetrical the explosion is. A value of zero indicates a completely symmetrical blast (in all three dimensions). A larger value indicates a lower likelihood of symmetry. A value of one indicates the platform default.
Note, this is a hint to the implementation. Implementations may not provide the means to produce semi-random form explosions.
default double getKnockback()
Note that the default behavior and strength is not defined here. A return value of 1 simply indicates the default behavior which is implementation dependent.