mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
Fix metalclips (#536)
* Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one
This commit is contained in:
parent
8a7b372445
commit
e93395f71e
1 changed files with 14 additions and 4 deletions
|
@ -414,10 +414,19 @@ public class MetalClips extends MetalAbility {
|
|||
|
||||
for (Entity e : GeneralMethods.getEntitiesAroundPoint(ii.getLocation(), 2)) {
|
||||
if (e instanceof LivingEntity && e.getEntityId() != player.getEntityId()) {
|
||||
if ((e instanceof Player || e instanceof Zombie || e instanceof Skeleton) && targetEntity == null) {
|
||||
targetEntity = (LivingEntity) e;
|
||||
TARGET_TO_ABILITY.put(targetEntity, this);
|
||||
formArmor();
|
||||
if ((e instanceof Player || e instanceof Zombie || e instanceof Skeleton)) {
|
||||
if (targetEntity == null) {
|
||||
targetEntity = (LivingEntity) e;
|
||||
TARGET_TO_ABILITY.put(targetEntity, this);
|
||||
formArmor();
|
||||
} else if (targetEntity == e) {
|
||||
formArmor();
|
||||
} else {
|
||||
TARGET_TO_ABILITY.get(targetEntity).remove();
|
||||
targetEntity = (LivingEntity) e;
|
||||
TARGET_TO_ABILITY.put(targetEntity, this);
|
||||
formArmor();
|
||||
}
|
||||
} else {
|
||||
DamageHandler.damageEntity(e, 5, this);
|
||||
ii.getWorld().dropItem(ii.getLocation(), ii.getItemStack());
|
||||
|
@ -425,6 +434,7 @@ public class MetalClips extends MetalAbility {
|
|||
}
|
||||
|
||||
ii.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue