public List<Mass> findReachableMassesAndInputs(Mass mass, Range range, boolean excludeCrossings) {
        List<Mass> massesInRange = new LinkedList<>();

        for (Mass candidate : masses) {
            if (mass == candidate) {
                continue;
            }

            if (candidate.getType() != NETWORK && candidate.getType() != INPUT) {
                continue;
            }

            if (excludeCrossings && wouldSpringToMassCrossExistingNetworkSprings(mass, candidate)) {
                continue;
            }

            double distance = mass.calculateDistance(candidate);

            if (distance >= range.getMin() && distance <= range.getMax()) {
                massesInRange.add(candidate);
            }
        }

        return massesInRange;
    }