Class Explosion
java.lang.Object
me.deecaad.weaponmechanics.weapon.explode.Explosion
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<Explosion>
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for serializer.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. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddamageBlocks(List<org.bukkit.block.Block> blocks, boolean isAtOnce, org.bukkit.Location origin, int timeOffset, PlayerWrapper playerWrapper, WeaponProjectile projectile) voidexplode(org.bukkit.entity.LivingEntity cause, org.bukkit.Location origin, WeaponProjectile projectile) doubledoubleme.deecaad.core.mechanics.MechanicManagergetShape()voidhandleExplosion(org.bukkit.entity.LivingEntity cause, WeaponProjectile projectile, ExplosionTrigger trigger) voidhandleExplosion(org.bukkit.entity.LivingEntity cause, org.bukkit.Location origin, WeaponProjectile projectile, ExplosionTrigger trigger) booleanserialize(me.deecaad.core.file.SerializeData data) protected voidspawnFallingBlock(org.bukkit.Location location, org.bukkit.block.BlockState state, org.bukkit.util.Vector velocity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, letPassThrough, shouldSerialize, tryPathTo, useLater
-
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 byBlockDamage.detonation- The object containing information about when explosion should detonate.blockChance- The chance [0, 1] for block fromBlockDamageto 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
-
getExposure
-
getBlockDamage
-
getRegeneration
-
getDetonation
-
getBlockChance
public double getBlockChance() -
isKnockback
public boolean isKnockback() -
getKnockbackRate
public double getKnockbackRate() -
getCluster
-
getAirStrike
-
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
- Specified by:
getKeywordin interfaceme.deecaad.core.file.Serializer<Explosion>
-
getWikiLink
- Specified by:
getWikiLinkin interfaceme.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:
serializein interfaceme.deecaad.core.file.Serializer<Explosion>- Throws:
me.deecaad.core.file.SerializerException
-