Fixed the InventoryHelper.extractItemStackFromInventory() not respecting the accessible slots.

This fixes the InventoryHelper.extractItemStackFromInventory() not respecting the accessible slots, by using the slots array instead of just i as slot.