mirror of https://github.com/Minestom/Minestom.git
Fast exit when the entity has no viewer
This commit is contained in:
parent
ae71c09b4f
commit
5930626dad
|
@ -233,6 +233,7 @@ final class EntityView {
|
|||
Player[] players;
|
||||
synchronized (mutex) {
|
||||
var bitSet = viewableOption.bitSet;
|
||||
if (bitSet.isEmpty()) return Collections.emptyIterator();
|
||||
players = new Player[bitSet.size()];
|
||||
int i = 0;
|
||||
for (IntIterator it = bitSet.intIterator(); it.hasNext(); ) {
|
||||
|
|
Loading…
Reference in New Issue