Interface Explosion

All Superinterfaces:
Locatable

public interface Explosion extends Locatable
Represents an explosion in a World.
  • Method Details

    • builder

      static Explosion.Builder builder()
      Creates a new Explosion.Builder to build a Explosion.
      Returns:
      The new builder
    • sourceExplosive

      Optional<Explosive> sourceExplosive()
      Gets the source Explosive of 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