import { world } from '@minecraft/server';
import EntityStatus from './main';
export function getInfectedPlayers(options) {
    return world.getPlayers(options)
        .map((p) => new EntityStatus(p))
        .filter((p) => p.isInfected());
}
export function getInfectedEntities(options) {
    const infectedEntities = [];
    const dimension = world.getDimension('overworld');
    for (const entity of dimension.getEntities(options)) {
        const status = new EntityStatus(entity);
        if (status.isInfected()) {
            infectedEntities.push(status);
        }
    }
    return infectedEntities;
}
