Check for removed entity before targeting

This commit is contained in:
LeoDog896 2021-01-12 15:16:24 -05:00
parent fcc5bc4381
commit 37d528c5a2

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;