mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-18 22:24:35 +00:00
IceBlast get and set
This commit is contained in:
parent
fa18bddf4c
commit
0817b222a9
1 changed files with 10 additions and 15 deletions
|
@ -23,7 +23,7 @@ import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||||
public class IceBlast {
|
public class IceBlast {
|
||||||
|
|
||||||
public static ConcurrentHashMap<Integer, IceBlast> instances = new ConcurrentHashMap<Integer, IceBlast>();
|
public static ConcurrentHashMap<Integer, IceBlast> instances = new ConcurrentHashMap<Integer, IceBlast>();
|
||||||
private static double RANGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.IceBlast.Range");
|
private static double defaultrange = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.IceBlast.Range");
|
||||||
private static int DAMAGE = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.IceBlast.Damage");
|
private static int DAMAGE = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.IceBlast.Damage");
|
||||||
private static int ID = Integer.MIN_VALUE;
|
private static int ID = Integer.MIN_VALUE;
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ public class IceBlast {
|
||||||
private Block sourceblock;
|
private Block sourceblock;
|
||||||
private Player player;
|
private Player player;
|
||||||
private TempBlock source;
|
private TempBlock source;
|
||||||
private double defaultrange = RANGE;
|
|
||||||
private double defaultdamage = DAMAGE;
|
private double defaultdamage = DAMAGE;
|
||||||
|
|
||||||
public IceBlast(Player player) {
|
public IceBlast(Player player) {
|
||||||
|
@ -113,7 +112,7 @@ public class IceBlast {
|
||||||
Location location = player.getEyeLocation();
|
Location location = player.getEyeLocation();
|
||||||
Vector vector = location.getDirection();
|
Vector vector = location.getDirection();
|
||||||
Location mloc = ice.location;
|
Location mloc = ice.location;
|
||||||
if (mloc.distance(location) <= RANGE
|
if (mloc.distance(location) <= defaultrange
|
||||||
&& Methods.getDistanceFromLine(vector, location, ice.location) < deflectrange
|
&& Methods.getDistanceFromLine(vector, location, ice.location) < deflectrange
|
||||||
&& mloc.distance(location.clone().add(vector)) <
|
&& mloc.distance(location.clone().add(vector)) <
|
||||||
mloc.distance(location.clone().add(vector.clone().multiply(-1)))) {
|
mloc.distance(location.clone().add(vector.clone().multiply(-1)))) {
|
||||||
|
@ -321,18 +320,6 @@ public class IceBlast {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayer(Player player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getDefaultrange() {
|
|
||||||
return defaultrange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDefaultrange(double defaultrange) {
|
|
||||||
this.defaultrange = defaultrange;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getDefaultdamage() {
|
public double getDefaultdamage() {
|
||||||
return defaultdamage;
|
return defaultdamage;
|
||||||
}
|
}
|
||||||
|
@ -341,4 +328,12 @@ public class IceBlast {
|
||||||
this.defaultdamage = defaultdamage;
|
this.defaultdamage = defaultdamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getRange() {
|
||||||
|
return range;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRange(double range) {
|
||||||
|
this.range = range;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue