public interface Explosion
World
.Modifier and Type | Method and Description |
---|---|
boolean |
canCauseFire()
Gets whether the affected blocks have a chance to catch on fire.
|
void |
canCauseFire(boolean fire)
Sets whether the affected blocks have a chance to catch on fire.
|
void |
canPlaySmoke(boolean smoke)
Sets whether the explosion will show smoke to the client
|
com.flowpowered.math.vector.Vector3d |
getOrigin()
Gets a copy of the explosion's origin.
|
float |
getRadius()
Gets the radius of the explosion.
|
Optional<Explosive> |
getSourceExplosive()
Gets the source
Explosive of the explosion. |
World |
getWorld()
Gets the world the explosion will occur in.
|
void |
setOrigin(com.flowpowered.math.vector.Vector3d origin)
Sets the origin of the explosion.
|
void |
setRadius(float radius)
Sets the radius of the explosion.
|
void |
setSourceExplosive(Explosive source)
Sets the source explosive of the explosion.
|
void |
setWorld(World world)
Sets the world the explosion will occur in.
|
boolean |
shouldBreakBlocks()
Gets whether the affected blocks should be destroyed on explosion.
|
void |
shouldBreakBlocks(boolean destroy)
If true, blocks will be set to BlockTypes.AIR and items dropped.
|
boolean |
shouldPlaySmoke()
Gets whether the explosion will play a smoke effect.
|
World getWorld()
void setWorld(World world)
world
- The worldOptional<Explosive> getSourceExplosive()
Explosive
of the explosion.void setSourceExplosive(@Nullable Explosive source)
source
- The source explosivefloat getRadius()
void setRadius(float radius)
radius
- The radiuscom.flowpowered.math.vector.Vector3d getOrigin()
void setOrigin(com.flowpowered.math.vector.Vector3d origin)
origin
- The originboolean canCauseFire()
void canCauseFire(boolean fire)
fire
- Whether the affected blocks can catch on fireboolean shouldPlaySmoke()
void canPlaySmoke(boolean smoke)
smoke
- Whether the explosion will play smokeboolean shouldBreakBlocks()
void shouldBreakBlocks(boolean destroy)
destroy
- Whether the affected blocks should be destroyed