mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Fixed healingwaters shift functionality
This commit is contained in:
parent
de454ac88d
commit
4701e5f9cf
1 changed files with 8 additions and 10 deletions
|
@ -36,22 +36,20 @@ public class HealingWaters extends HealingAbility {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void heal(Player player) {
|
||||
if (inWater(player)) {
|
||||
if (player.isSneaking()) {
|
||||
Entity entity = GeneralMethods.getTargetedEntity(player, getRadius());
|
||||
if (entity instanceof LivingEntity && inWater(entity)) {
|
||||
if (getShiftRequired() && player.isSneaking()) {
|
||||
giveHPToEntity((LivingEntity) entity);
|
||||
} else if (!getShiftRequired()) {
|
||||
giveHPToEntity((LivingEntity) entity);
|
||||
}
|
||||
if (entity == null) {
|
||||
giveHP(player);
|
||||
} else {
|
||||
giveHPToEntity((LivingEntity) entity);
|
||||
}
|
||||
} else {
|
||||
if (getShiftRequired() && player.isSneaking()) {
|
||||
giveHP(player);
|
||||
} else if (!getShiftRequired()) {
|
||||
if (getShiftRequired()) {
|
||||
return;
|
||||
} else {
|
||||
giveHP(player);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue