Skip to content

Commit

Permalink
reduce cross-world erroring
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 1, 2017
1 parent 80955f8 commit b6b335e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,9 @@ public void swapToMelee() {
}

public void tryAttack(LivingEntity entity) {
if (!entity.getWorld().equals(getLivingEntity().getWorld())) {
return;
}
// TODO: Simplify this code!
stats_attackAttempts++;
double dist = getLivingEntity().getEyeLocation().distanceSquared(entity.getEyeLocation());
Expand Down

0 comments on commit b6b335e

Please sign in to comment.