Made 'shooterless' arrows dodgeable

This commit is contained in:
bm01
2012-06-22 19:39:14 +02:00
parent 3e20dc7de6
commit d51fa92b46
3 changed files with 8 additions and 13 deletions

View File

@@ -173,8 +173,8 @@ public class Combat {
case ARROW:
LivingEntity shooter = ((Arrow) damager).getShooter();
if (shooter.getType() != EntityType.PLAYER) {
return;
if (shooter == null || shooter.getType() != EntityType.PLAYER) {
break;
}
if (targetIsPlayer || targetIsTamedPet) {
@@ -191,7 +191,7 @@ public class Combat {
break;
}
if (targetIsPlayer && damager instanceof LivingEntity) {
if (targetIsPlayer) {
Player player = (Player) target;
AcrobaticsManager acroManager = new AcrobaticsManager(player);
@@ -207,7 +207,7 @@ public class Combat {
}
}
else {
if (configInstance.getSwordsPVE()) {
if (configInstance.getSwordsPVE() && damager instanceof LivingEntity) {
swordsManager.counterAttackChecks((LivingEntity) damager, event.getDamage());
}