mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +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.wrongNumber = ConfigManager.languageConfig.get().getString("Commands.Bind.WrongNumber");
|
||||
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.noElementAE = ConfigManager.languageConfig.get().getString("Commands.Bind.NoElementAE");
|
||||
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());
|
||||
double distance = 0;
|
||||
if(location.getWorld().equals(target.getWorld())) {
|
||||
location.distance(target.getLocation());
|
||||
distance = location.distance(target.getLocation());
|
||||
}
|
||||
double dx, dy, dz;
|
||||
dx = location.getX() - target.getLocation().getX();
|
||||
|
@ -415,4 +415,4 @@ public class Bloodbending extends BloodAbility {
|
|||
this.cooldown = cooldown;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -37,7 +37,6 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
private int spearSphereNight;
|
||||
private int spearSphereFullMoon;
|
||||
private int distanceTravelled;
|
||||
private int layer;
|
||||
private long spearDuration;
|
||||
private long spearDurationNight;
|
||||
private long spearDurationFullMoon;
|
||||
|
@ -158,10 +157,7 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
remove();
|
||||
}
|
||||
|
||||
if (layer >= spearSphere) {
|
||||
remove();
|
||||
return;
|
||||
} else if (!canPlaceBlock(location.getBlock())) {
|
||||
if (!canPlaceBlock(location.getBlock())) {
|
||||
if (canFreeze) {
|
||||
createSpear();
|
||||
}
|
||||
|
@ -230,6 +226,12 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
}
|
||||
|
||||
private void createIceBall() {
|
||||
if (spearSphere <= 0) {
|
||||
if (canFreeze) {
|
||||
createSpear();
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (Block block : GeneralMethods.getBlocksAroundPoint(location, spearSphere)) {
|
||||
if (isTransparent(player, block) && block.getType() != Material.ICE && !WaterArms.isUnbreakable(block)) {
|
||||
playIcebendingSound(block.getLocation());
|
||||
|
@ -389,14 +391,6 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
this.distanceTravelled = distanceTravelled;
|
||||
}
|
||||
|
||||
public int getLayer() {
|
||||
return layer;
|
||||
}
|
||||
|
||||
public void setLayer(int layer) {
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public long getSpearDuration() {
|
||||
return spearDuration;
|
||||
}
|
||||
|
@ -473,4 +467,4 @@ public class WaterArmsSpear extends WaterAbility {
|
|||
return ICE_BLOCKS;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -79,6 +79,7 @@ public class WaterSpout extends WaterAbility {
|
|||
|
||||
new Flight(player);
|
||||
player.setAllowFlight(true);
|
||||
spoutableWaterHeight(player.getLocation()); //Sets base
|
||||
start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue