Do not override stream methods

This commit is contained in:
themode 2022-02-13 17:36:06 +01:00
parent 0f421c22db
commit fef0bbe01b

View File

@ -256,13 +256,6 @@ public final class ViewEngine {
viewableOption.references().forEach(action);
}
}
@Override
public Stream<Player> stream() {
synchronized (mutex) {
return viewableOption.references();
}
}
}
final class EntitySet extends AbstractSet<Player> {
@ -303,17 +296,5 @@ public final class ViewEngine {
viewableOption.bitSet.forEach((int id) -> action.accept((Player) Entity.getEntity(id)));
}
}
@Override
public Stream<Player> stream() {
synchronized (mutex) {
return viewableOption.bitSet.intStream().mapToObj(operand -> (Player) Entity.getEntity(operand));
}
}
@Override
public Stream<Player> parallelStream() {
return stream().parallel();
}
}
}