mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-01-11 01:17:11 +00:00
Fix tornado & Fix FireJet being harmless
This commit is contained in:
parent
28eaace99b
commit
db54c39b74
2 changed files with 5 additions and 3 deletions
|
@ -27,6 +27,7 @@ public class Tornado extends AirAbility {
|
||||||
private double npcPushFactor;
|
private double npcPushFactor;
|
||||||
private double currentHeight;
|
private double currentHeight;
|
||||||
private double currentRadius;
|
private double currentRadius;
|
||||||
|
private boolean couldFly;
|
||||||
private Flight flight;
|
private Flight flight;
|
||||||
private Location origin;
|
private Location origin;
|
||||||
private Random random;
|
private Random random;
|
||||||
|
@ -35,12 +36,12 @@ public class Tornado extends AirAbility {
|
||||||
public Tornado(Player player) {
|
public Tornado(Player player) {
|
||||||
super(player);
|
super(player);
|
||||||
|
|
||||||
|
this.range = getConfig().getDouble("Abilities.Air.Tornado.Range");
|
||||||
this.origin = player.getTargetBlock((HashSet<Material>) null, (int) range).getLocation();
|
this.origin = player.getTargetBlock((HashSet<Material>) null, (int) range).getLocation();
|
||||||
this.origin.setY(origin.getY() - 1.0 / 10.0 * currentHeight);
|
this.origin.setY(origin.getY() - 1.0 / 10.0 * currentHeight);
|
||||||
this.maxHeight = getConfig().getDouble("Abilities.Air.Tornado.Height");
|
this.maxHeight = getConfig().getDouble("Abilities.Air.Tornado.Height");
|
||||||
this.playerPushFactor = getConfig().getDouble("Abilities.Air.Tornado.PlayerPushFactor");
|
this.playerPushFactor = getConfig().getDouble("Abilities.Air.Tornado.PlayerPushFactor");
|
||||||
this.radius = getConfig().getDouble("Abilities.Air.Tornado.Radius");
|
this.radius = getConfig().getDouble("Abilities.Air.Tornado.Radius");
|
||||||
this.range = getConfig().getDouble("Abilities.Air.Tornado.Range");
|
|
||||||
this.npcPushFactor = getConfig().getDouble("Abilities.Air.Tornado.NpcPushFactor");
|
this.npcPushFactor = getConfig().getDouble("Abilities.Air.Tornado.NpcPushFactor");
|
||||||
this.speed = getConfig().getDouble("Abilities.Air.Tornado.Speed");
|
this.speed = getConfig().getDouble("Abilities.Air.Tornado.Speed");
|
||||||
this.numberOfStreams = (int) (.3 * (double) maxHeight);
|
this.numberOfStreams = (int) (.3 * (double) maxHeight);
|
||||||
|
@ -59,6 +60,7 @@ public class Tornado extends AirAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.flight = new Flight(player);
|
this.flight = new Flight(player);
|
||||||
|
this.couldFly = player.getAllowFlight();
|
||||||
player.setAllowFlight(true);
|
player.setAllowFlight(true);
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
@ -79,7 +81,7 @@ public class Tornado extends AirAbility {
|
||||||
public void remove() {
|
public void remove() {
|
||||||
super.remove();
|
super.remove();
|
||||||
flight.remove();
|
flight.remove();
|
||||||
player.setAllowFlight(false);
|
player.setAllowFlight(couldFly);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rotateTornado() {
|
private void rotateTornado() {
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class FireJet extends FireAbility {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHarmlessAbility() {
|
public boolean isHarmlessAbility() {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAvatarStateToggled() {
|
public boolean isAvatarStateToggled() {
|
||||||
|
|
Loading…
Reference in a new issue