private int getNumberBySlot(int slot) {
		slot--; // skip this parameter (not an outer value)
		for (int i = 0; slot >= 0 && i < headCount; i++) {
			if (slot == 0)
				return i;
			slot -= head[i].getType().stackSize();
		}
		return -1;
	}