mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 12:49:32 +00:00
Fix AirSwipe charged version
This commit is contained in:
parent
b251971e2f
commit
c4c12c45e8
|
@ -63,7 +63,6 @@ public class AirSwipe extends AirAbility {
|
||||||
ability = this;
|
ability = this;
|
||||||
this.charging = charging;
|
this.charging = charging;
|
||||||
this.origin = player.getEyeLocation();
|
this.origin = player.getEyeLocation();
|
||||||
this.charging = false;
|
|
||||||
this.particles = getConfig().getInt("Abilities.Air.AirSwipe.Particles");
|
this.particles = getConfig().getInt("Abilities.Air.AirSwipe.Particles");
|
||||||
this.arc = getConfig().getInt("Abilities.Air.AirSwipe.Arc");
|
this.arc = getConfig().getInt("Abilities.Air.AirSwipe.Arc");
|
||||||
this.stepSize = getConfig().getInt("Abilities.Air.AirSwipe.StepSize");
|
this.stepSize = getConfig().getInt("Abilities.Air.AirSwipe.StepSize");
|
||||||
|
@ -74,12 +73,18 @@ public class AirSwipe extends AirAbility {
|
||||||
this.speed = getConfig().getDouble("Abilities.Air.AirSwipe.Speed") * (ProjectKorra.time_step / 1000.0);
|
this.speed = getConfig().getDouble("Abilities.Air.AirSwipe.Speed") * (ProjectKorra.time_step / 1000.0);
|
||||||
this.range = getConfig().getDouble("Abilities.Air.AirSwipe.Range");
|
this.range = getConfig().getDouble("Abilities.Air.AirSwipe.Range");
|
||||||
this.radius = getConfig().getDouble("Abilities.Air.AirSwipe.Radius");
|
this.radius = getConfig().getDouble("Abilities.Air.AirSwipe.Radius");
|
||||||
this.maxChargeFactor = getConfig().getDouble("Abilities.Air.AirSwipe.chargeFactor");
|
this.maxChargeFactor = getConfig().getDouble("Abilities.Air.AirSwipe.ChargeFactor");
|
||||||
this.random = new Random();
|
this.random = new Random();
|
||||||
this.elements = new ConcurrentHashMap<>();
|
this.elements = new ConcurrentHashMap<>();
|
||||||
this.affectedEntities = new ArrayList<>();
|
this.affectedEntities = new ArrayList<>();
|
||||||
|
|
||||||
if (bPlayer.isOnCooldown(this) || player.getEyeLocation().getBlock().isLiquid()) {
|
if (bPlayer.isOnCooldown(this) || player.getEyeLocation().getBlock().isLiquid()) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bPlayer.canBend(this)) {
|
||||||
|
remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +260,6 @@ public class AirSwipe extends AirAbility {
|
||||||
remove();
|
remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!charging) {
|
if (!charging) {
|
||||||
if (elements.isEmpty()) {
|
if (elements.isEmpty()) {
|
||||||
remove();
|
remove();
|
||||||
|
@ -263,11 +267,6 @@ public class AirSwipe extends AirAbility {
|
||||||
}
|
}
|
||||||
advanceSwipe();
|
advanceSwipe();
|
||||||
} else {
|
} else {
|
||||||
if (!bPlayer.canBend(this)) {
|
|
||||||
remove();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
double factor = 1;
|
double factor = 1;
|
||||||
if (System.currentTimeMillis() >= startTime + maxChargeTime) {
|
if (System.currentTimeMillis() >= startTime + maxChargeTime) {
|
||||||
|
@ -283,7 +282,6 @@ public class AirSwipe extends AirAbility {
|
||||||
factor = Math.max(1, factor);
|
factor = Math.max(1, factor);
|
||||||
damage *= factor;
|
damage *= factor;
|
||||||
pushFactor *= factor;
|
pushFactor *= factor;
|
||||||
return;
|
|
||||||
} else if (System.currentTimeMillis() >= startTime + maxChargeTime) {
|
} else if (System.currentTimeMillis() >= startTime + maxChargeTime) {
|
||||||
playAirbendingParticles(player.getEyeLocation(), particles);
|
playAirbendingParticles(player.getEyeLocation(), particles);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue