public List<Node> findPath(Vector2i start, Vector2i end, int distance){
		List<Node> openList = new ArrayList<Node>();
		List<Node> closedList = new ArrayList<Node>();
		Node current = new Node(start, null, 0, getDistance(start, end));
		openList.add(current);
		while(openList.size() > 0){
			if(distance != 0) if(openList.size() > distance) return null;
			Collections.sort(openList, nodeSorter);
			current = openList.get(0);
			if(current.getTile().equals(end)){
				List<Node> path = new ArrayList<Node>();
				while(current.getParent() != null){
					path.add(current);
					current = current.getParent();
				}
				openList.clear();
				closedList.clear();
				return path;
			}
			openList.remove(current);
			closedList.add(current);
			for(int i = 0; i < 9; i++){
				if(i == 0 || i == 2 || i == 4 || i == 6 || i == 8) continue;
				int x = current.getTile().getX();
				int y = current.getTile().getY();
				int xi = (i % 3) - 1;
				int yi = (i / 3) - 1;
				Tile t = dungeon.getTile(x + xi, y + yi);
				if(t.solid()) continue;
//				if(dungeon.mob[x + xi][y + yi] != -1) continue;
				Vector2i a = new Vector2i(x + xi, y + yi);
				double gCost = current.getgCost() + (getDistance(current.getTile(), a) == 1 ? 1 : 0.95);
				double hCost = getDistance(a, end);
				Node node = new Node(a, current, gCost, hCost);
				if(vecInList(closedList, a) && gCost >= node.getgCost()) continue;
				if(!vecInList(openList, a) || gCost < node.getgCost()) openList.add(node);			
			}
		}
		return null;
	}