mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 12:49:32 +00:00
Fixed FireBlast and Combustion not respecting "canFireGrief" (#522)
* Fixed torrent temp flooding. * Fixed IceWave cooldown. * Fixed fireblast and combustion not respecting "canFireGrief"
This commit is contained in:
parent
db61b0d979
commit
5eed58d9d4
|
@ -98,12 +98,14 @@ public class Combustion extends CombustionAbility {
|
|||
}
|
||||
|
||||
private void createExplosion(Location block, float power, boolean canBreakBlocks) {
|
||||
block.getWorld().createExplosion(block.getX(), block.getY(), block.getZ(), power, true, canBreakBlocks);
|
||||
for (Entity entity : block.getWorld().getEntities()) {
|
||||
if (entity instanceof LivingEntity) {
|
||||
if (entity.getLocation().distanceSquared(block) < radius * radius) { // They are close enough to the explosion.
|
||||
DamageHandler.damageEntity((LivingEntity) entity, damage, this);
|
||||
AirAbility.breakBreathbendingHold(entity);
|
||||
if(canFireGrief()) {
|
||||
block.getWorld().createExplosion(block.getX(), block.getY(), block.getZ(), power, true, canBreakBlocks);
|
||||
}
|
||||
for (Entity entity : block.getWorld().getEntities()) {
|
||||
if (entity instanceof LivingEntity) {
|
||||
if (entity.getLocation().distanceSquared(block) < radius * radius) { // They are close enough to the explosion.
|
||||
DamageHandler.damageEntity((LivingEntity) entity, damage, this);
|
||||
AirAbility.breakBreathbendingHold(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public class FireBlastCharged extends FireAbility {
|
|||
public void explode() {
|
||||
boolean explode = true;
|
||||
for (Block block : GeneralMethods.getBlocksAroundPoint(location, 3)) {
|
||||
if (GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) {
|
||||
if (GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation()) || !canFireGrief()) {
|
||||
explode = false;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue