private int countItemsInInventory() {
		Inventory inv = player.getInventory();
		int items = 0;
		for(int i = 0; i < inv.getItemCount(); i++) {
			Item item = inv.getItem(i);
			if(item != null) {
				items++;
			}
		}
		return items;
	}