java.lang.Object
me.deecaad.weaponmechanics.weapon.explode.Explosion
All Implemented Interfaces:
me.deecaad.core.file.Serializer<Explosion>

public class Explosion extends Object implements me.deecaad.core.file.Serializer<Explosion>
  • Constructor Details

    • Explosion

      public Explosion()
      Default constructor for serializer.
    • Explosion

      public Explosion(ExplosionShape shape, ExplosionExposure exposure, BlockDamage blockDamage, RegenerationData regeneration, Detonation detonation, double blockChance, double knockbackRate, ClusterBomb clusterBomb, AirStrike airStrike, Flashbang flashbang, me.deecaad.core.mechanics.MechanicManager mechanics)
      The main constructor for explosions. See parameters.
      Parameters:
      shape - The non-null shape that determines the pattern in which all blocks are destroyed.
      exposure - The non-null method to determine how exposed each entity is to the origin of this explosion.
      blockDamage - The nullable data to determine how each block is damaged. If null is used, blocks will not be damaged.
      regeneration - The nullable data to determine how blocks are regenerated after being broken by BlockDamage.
      detonation - The object containing information about when explosion should detonate.
      blockChance - The chance [0, 1] for block from BlockDamage to spawn a packet based falling block.
      knockbackRate - Use true to enable vanilla MC explosion knockback.
      clusterBomb - The nullable cluster bomb (Children explosions).
      airStrike - The nullable airstrike (Explosions from the air).
      flashbang - The nullable flashbang (To blind players).
      mechanics - The nullable mechanics, spawned at the origin of the explosion.
  • Method Details

    • getShape

      public ExplosionShape getShape()
    • getExposure

      public ExplosionExposure getExposure()
    • getBlockDamage

      public BlockDamage getBlockDamage()
    • getRegeneration

      public RegenerationData getRegeneration()
    • getDetonation

      public Detonation getDetonation()
    • getBlockChance

      public double getBlockChance()
    • isKnockback

      public boolean isKnockback()
    • getKnockbackRate

      public double getKnockbackRate()
    • getCluster

      public ClusterBomb getCluster()
    • getAirStrike

      public AirStrike getAirStrike()
    • getFlashbang

      public Flashbang getFlashbang()
    • getMechanics

      public me.deecaad.core.mechanics.MechanicManager getMechanics()
    • handleExplosion

      public void handleExplosion(org.bukkit.entity.LivingEntity cause, WeaponProjectile projectile, ExplosionTrigger trigger)
    • handleExplosion

      public void handleExplosion(org.bukkit.entity.LivingEntity cause, @Nullable org.bukkit.Location origin, WeaponProjectile projectile, ExplosionTrigger trigger)
    • explode

      public void explode(org.bukkit.entity.LivingEntity cause, org.bukkit.Location origin, WeaponProjectile projectile)
    • damageBlocks

      protected void damageBlocks(List<org.bukkit.block.Block> blocks, boolean isAtOnce, org.bukkit.Location origin, int timeOffset, PlayerWrapper playerWrapper, WeaponProjectile projectile)
    • spawnFallingBlock

      protected void spawnFallingBlock(org.bukkit.Location location, org.bukkit.block.BlockState state, org.bukkit.util.Vector velocity)
    • getKeyword

      public String getKeyword()
      Specified by:
      getKeyword in interface me.deecaad.core.file.Serializer<Explosion>
    • getWikiLink

      public String getWikiLink()
      Specified by:
      getWikiLink in interface me.deecaad.core.file.Serializer<Explosion>
    • serialize

      @NotNull public Explosion serialize(@NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException
      Specified by:
      serialize in interface me.deecaad.core.file.Serializer<Explosion>
      Throws:
      me.deecaad.core.file.SerializerException