mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-5010: World#getEntitiesByClass/es also return entities in border chunks.
This commit is contained in:
parent
43431ba65b
commit
30a6337982
1 changed files with 2 additions and 2 deletions
|
@ -861,7 +861,7 @@ public class CraftWorld implements World {
|
||||||
|
|
||||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||||
|
|
||||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
||||||
list.add((T) bukkitEntity);
|
list.add((T) bukkitEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -885,7 +885,7 @@ public class CraftWorld implements World {
|
||||||
Class<?> bukkitClass = bukkitEntity.getClass();
|
Class<?> bukkitClass = bukkitEntity.getClass();
|
||||||
|
|
||||||
for (Class<?> clazz : classes) {
|
for (Class<?> clazz : classes) {
|
||||||
if (clazz.isAssignableFrom(bukkitClass)) {
|
if (clazz.isAssignableFrom(bukkitClass) && bukkitEntity.isValid()) {
|
||||||
list.add(bukkitEntity);
|
list.add(bukkitEntity);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue