Merge pull request #101 from LeoDog896/master

Check for removed entity before targeting
This commit is contained in:
TheMode 2021-01-12 21:18:24 +01:00 committed by GitHub
commit 1b1d74ceee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,11 @@ public class ClosestEntityTarget extends TargetSelector {
continue;
}
if (ent.isRemoved()) {
// Entity not valid
return null;
}
// Check if the entity type can be targeted
final Class<? extends Entity> clazz = ent.getClass();
boolean correct = false;