Interface Explosion
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExplosion.BuilderA builder forExplosion.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Explosion.Builderbuilder()Creates a newExplosion.Builderto build aExplosion.booleancanCauseFire()Gets whether the affected blocks have a chance to catch on fire.default doubleknockback()Gets the relative strength of the knockback applied to nearby objects that can be knocked back.floatradius()Gets the radius of the explosion.default floatrandomness()Gets an indication of the randomness of the form of the explosion.default intresolution()Gets a value that indicates the relative strength of an explosion.booleanshouldBreakBlocks()Gets whether the affected blocks should be destroyed on explosion.booleanshouldDamageEntities()Gets whether this explosion will damage entities.booleanshouldPlaySmoke()Gets whether the explosion will play a smoke effect.Optional<Explosive>sourceExplosive()Gets the sourceExplosiveof the explosion.-
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
-
-
-
Method Detail
-
builder
static Explosion.Builder builder()
Creates a newExplosion.Builderto build aExplosion.- Returns:
- The new builder
-
sourceExplosive
Optional<Explosive> sourceExplosive()
Gets the sourceExplosiveof the explosion.- Returns:
- The source explosive or null if there is no source
-
radius
float radius()
Gets the radius of the explosion.- Returns:
- The radius
-
canCauseFire
boolean canCauseFire()
Gets whether the affected blocks have a chance to catch on fire.- Returns:
- Whether the affected blocks can catch on fire
-
shouldPlaySmoke
boolean shouldPlaySmoke()
Gets whether the explosion will play a smoke effect.- Returns:
- Whether the explosion will play smoke
-
shouldBreakBlocks
boolean shouldBreakBlocks()
Gets whether the affected blocks should be destroyed on explosion.- Returns:
- Whether the affected blocks should be destroyed
-
shouldDamageEntities
boolean shouldDamageEntities()
Gets whether this explosion will damage entities.- Returns:
- Whether the explosion will damage entities
-
resolution
default int resolution()
Gets a value that indicates the relative strength of an explosion.- Returns:
- The resolution of the explosion.
-
randomness
default float randomness()
Gets an indication of the randomness of the form of the explosion.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.
- Returns:
- The potential randomness of the form of the explosion.
-
knockback
default double knockback()
Gets the relative strength of the knockback applied to nearby objects that can be knocked back.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.
- Returns:
- The multiple by which the knockback of entities will be changed
-
-