BreathSphere no longer goes through walls

This commit is contained in:
MistPhizzle 2014-08-24 14:36:35 -04:00
parent 03f176e59a
commit a55bfd0d97

View file

@ -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);