mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Bug fixes - Whoop Whoop :D (#654)
• Fixed Bloodbending not working • Fixed WaterArms spear not working when you set "Sphere" to 0 in the config • Fixed the "null" message that occurs when binding an ability from an element that has been toggled • Attempted to fix WaterSpout NPE (needs testing)
This commit is contained in:
parent
f30c6fa991
commit
2d9b4e7079
4 changed files with 12 additions and 17 deletions
|
@ -35,7 +35,7 @@ public class BindCommand extends PKCommand {
|
||||||
this.abilityDoesntExist = ConfigManager.languageConfig.get().getString("Commands.Bind.AbilityDoesntExist");
|
this.abilityDoesntExist = ConfigManager.languageConfig.get().getString("Commands.Bind.AbilityDoesntExist");
|
||||||
this.wrongNumber = ConfigManager.languageConfig.get().getString("Commands.Bind.WrongNumber");
|
this.wrongNumber = ConfigManager.languageConfig.get().getString("Commands.Bind.WrongNumber");
|
||||||
this.loadingInfo = ConfigManager.languageConfig.get().getString("Commands.Bind.LoadingInfo");
|
this.loadingInfo = ConfigManager.languageConfig.get().getString("Commands.Bind.LoadingInfo");
|
||||||
this.toggledElementOff = ConfigManager.languageConfig.get().getString("Commands.Bind.ToggledElementOff");
|
this.toggledElementOff = ConfigManager.languageConfig.get().getString("Commands.Bind.ElementToggledOff");
|
||||||
this.noElement = ConfigManager.languageConfig.get().getString("Commands.Bind.NoElement");
|
this.noElement = ConfigManager.languageConfig.get().getString("Commands.Bind.NoElement");
|
||||||
this.noElementAE = ConfigManager.languageConfig.get().getString("Commands.Bind.NoElementAE");
|
this.noElementAE = ConfigManager.languageConfig.get().getString("Commands.Bind.NoElementAE");
|
||||||
this.noSubElement = ConfigManager.languageConfig.get().getString("Commands.Bind.NoSubElement");
|
this.noSubElement = ConfigManager.languageConfig.get().getString("Commands.Bind.NoSubElement");
|
||||||
|
|
|
@ -258,7 +258,7 @@ public class Bloodbending extends BloodAbility {
|
||||||
Location location = GeneralMethods.getTargetedLocation(player, 6, getTransparentMaterial());
|
Location location = GeneralMethods.getTargetedLocation(player, 6, getTransparentMaterial());
|
||||||
double distance = 0;
|
double distance = 0;
|
||||||
if(location.getWorld().equals(target.getWorld())) {
|
if(location.getWorld().equals(target.getWorld())) {
|
||||||
location.distance(target.getLocation());
|
distance = location.distance(target.getLocation());
|
||||||
}
|
}
|
||||||
double dx, dy, dz;
|
double dx, dy, dz;
|
||||||
dx = location.getX() - target.getLocation().getX();
|
dx = location.getX() - target.getLocation().getX();
|
||||||
|
@ -415,4 +415,4 @@ public class Bloodbending extends BloodAbility {
|
||||||
this.cooldown = cooldown;
|
this.cooldown = cooldown;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -37,7 +37,6 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
private int spearSphereNight;
|
private int spearSphereNight;
|
||||||
private int spearSphereFullMoon;
|
private int spearSphereFullMoon;
|
||||||
private int distanceTravelled;
|
private int distanceTravelled;
|
||||||
private int layer;
|
|
||||||
private long spearDuration;
|
private long spearDuration;
|
||||||
private long spearDurationNight;
|
private long spearDurationNight;
|
||||||
private long spearDurationFullMoon;
|
private long spearDurationFullMoon;
|
||||||
|
@ -158,10 +157,7 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layer >= spearSphere) {
|
if (!canPlaceBlock(location.getBlock())) {
|
||||||
remove();
|
|
||||||
return;
|
|
||||||
} else if (!canPlaceBlock(location.getBlock())) {
|
|
||||||
if (canFreeze) {
|
if (canFreeze) {
|
||||||
createSpear();
|
createSpear();
|
||||||
}
|
}
|
||||||
|
@ -230,6 +226,12 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createIceBall() {
|
private void createIceBall() {
|
||||||
|
if (spearSphere <= 0) {
|
||||||
|
if (canFreeze) {
|
||||||
|
createSpear();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (Block block : GeneralMethods.getBlocksAroundPoint(location, spearSphere)) {
|
for (Block block : GeneralMethods.getBlocksAroundPoint(location, spearSphere)) {
|
||||||
if (isTransparent(player, block) && block.getType() != Material.ICE && !WaterArms.isUnbreakable(block)) {
|
if (isTransparent(player, block) && block.getType() != Material.ICE && !WaterArms.isUnbreakable(block)) {
|
||||||
playIcebendingSound(block.getLocation());
|
playIcebendingSound(block.getLocation());
|
||||||
|
@ -389,14 +391,6 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
this.distanceTravelled = distanceTravelled;
|
this.distanceTravelled = distanceTravelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLayer() {
|
|
||||||
return layer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLayer(int layer) {
|
|
||||||
this.layer = layer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getSpearDuration() {
|
public long getSpearDuration() {
|
||||||
return spearDuration;
|
return spearDuration;
|
||||||
}
|
}
|
||||||
|
@ -473,4 +467,4 @@ public class WaterArmsSpear extends WaterAbility {
|
||||||
return ICE_BLOCKS;
|
return ICE_BLOCKS;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -79,6 +79,7 @@ public class WaterSpout extends WaterAbility {
|
||||||
|
|
||||||
new Flight(player);
|
new Flight(player);
|
||||||
player.setAllowFlight(true);
|
player.setAllowFlight(true);
|
||||||
|
spoutableWaterHeight(player.getLocation()); //Sets base
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue