public RSNPC getNearest(final Filter<RSNPC> filter) {
int min = 20;
RSNPC closest = null;
final int[] indices = methods.client.getRSNPCIndexArray();
for (final int index : indices) {
final Node node = methods.nodes.lookup(methods.client.getRSNPCNC(), index);
if (node instanceof RSNPCNode) {
final RSNPC npc = new RSNPC(methods, ((RSNPCNode) node).getRSNPC());
if (npc != null && filter.accept(npc)) {
final int distance = methods.calc.distanceTo(npc);
if (distance < min) {