mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
BreathSphere no longer goes through walls
This commit is contained in:
parent
03f176e59a
commit
a55bfd0d97
1 changed files with 6 additions and 0 deletions
|
@ -105,6 +105,9 @@ public class BreathSphere {
|
|||
targetentities.put(entity, entity.getLocation().clone());
|
||||
}
|
||||
if (entity instanceof LivingEntity) {
|
||||
if (Methods.isObstructed(player.getLocation(), entity.getLocation())) {
|
||||
breakBreathSphere(entity);
|
||||
}
|
||||
((LivingEntity) entity).damage(damage);
|
||||
new TempPotionEffect((LivingEntity) entity, slow);
|
||||
new TempPotionEffect((LivingEntity) entity, nausea);
|
||||
|
@ -134,6 +137,9 @@ public class BreathSphere {
|
|||
} else {
|
||||
for (Entity entity : targetentities.keySet()) {
|
||||
if(entity instanceof LivingEntity) {
|
||||
if (Methods.isObstructed(player.getLocation(), entity.getLocation())) {
|
||||
breakBreathSphere(entity);
|
||||
}
|
||||
((LivingEntity) entity).damage(damage);
|
||||
new TempPotionEffect((LivingEntity) entity, slow);
|
||||
new TempPotionEffect((LivingEntity) entity, nausea);
|
||||
|
|
Loading…
Reference in a new issue