mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Fixed healingwaters shift functionality
This commit is contained in:
parent
de454ac88d
commit
4701e5f9cf
1 changed files with 8 additions and 10 deletions
|
@ -41,17 +41,15 @@ public class HealingWaters extends HealingAbility {
|
|||
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