mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fixed AirSwipe, MetalClips & WallOfFire (#557)
* Re-PR for Flight fix Added check to prevent multiple instances of Flight being created. * Fixed AirSwipe, MetalClips & WallOfFire
This commit is contained in:
parent
6bd5669417
commit
bd3a40fd43
3 changed files with 18 additions and 15 deletions
|
@ -266,10 +266,16 @@ public class AirSwipe extends AirAbility {
|
|||
}
|
||||
|
||||
public void progress() {
|
||||
if (!bPlayer.canBendIgnoreCooldowns(this)) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isDead() || !player.isOnline()) {
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!charging) {
|
||||
if (elements.isEmpty()) {
|
||||
remove();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.projectkorra.projectkorra.earthbending;
|
||||
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.MetalAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -17,11 +17,11 @@ import org.bukkit.entity.Zombie;
|
|||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.MetalAbility;
|
||||
import com.projectkorra.projectkorra.avatar.AvatarState;
|
||||
import com.projectkorra.projectkorra.util.DamageHandler;
|
||||
|
||||
public class MetalClips extends MetalAbility {
|
||||
|
||||
|
@ -221,6 +221,7 @@ public class MetalClips extends MetalAbility {
|
|||
|
||||
player.getWorld().dropItem(targetEntity.getLocation(), new ItemStack(Material.IRON_INGOT, metalClipsCount));
|
||||
isBeingWorn = false;
|
||||
bPlayer.addCooldown(this);
|
||||
}
|
||||
|
||||
public void launch() {
|
||||
|
@ -468,10 +469,6 @@ public class MetalClips extends MetalAbility {
|
|||
ENTITY_CLIPS_COUNT.remove(targetEntity);
|
||||
TARGET_TO_ABILITY.remove(targetEntity);
|
||||
}
|
||||
|
||||
if (player != null && player.isOnline()) {
|
||||
bPlayer.addCooldown(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isControlled(LivingEntity player) {
|
||||
|
|
|
@ -89,6 +89,7 @@ public class WallOfFire extends FireAbility {
|
|||
}
|
||||
|
||||
private void affect(Entity entity) {
|
||||
GeneralMethods.setVelocity(entity, new Vector(0, 0, 0));
|
||||
if (entity instanceof LivingEntity) {
|
||||
Block block = ((LivingEntity) entity).getEyeLocation().getBlock();
|
||||
if (TempBlock.isTempBlock(block) && isIce(block)) {
|
||||
|
@ -98,7 +99,6 @@ public class WallOfFire extends FireAbility {
|
|||
AirAbility.breakBreathbendingHold(entity);
|
||||
}
|
||||
entity.setFireTicks((int) (fireTicks * 20));
|
||||
entity.setVelocity(player.getLocation().getDirection().multiply(1.4));
|
||||
new FireDamageTimer(entity, player);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue