docs: public static void removeIngredientsFromPlayer(EntityPlayerMP player, List<ItemStack> ingredients)
      {
          NonNullList<ItemStack> main = player.inventory.mainInventory;
          NonNullList<ItemStack> arm = player.inventory.armorInventory;
  
          for (ItemStack isIngredient : ingredients)
          {
              int target = isIngredient.getCount();
              for (int i = 0; i < main.size() + arm.size() && target > 0; i++)
              {
                  ItemStack isPlayer = (i >= main.size()) ? arm.get(i - main.size()) : main.get(i);
                  if (isPlayer != null && isIngredient != null && itemStackIngredientsMatch(isPlayer, isIngredient))
                  {
                      if (target >= isPlayer.getCount())
                      {
                          // Consume this stack:
                          target -= isPlayer.getCount();
                          if (i >= main.size())
                              arm.get(i - main.size()).setCount(0);
                          else
                              main.get(i).setCount(0);
                      }
                      else
                      {
                          isPlayer.setCount(isPlayer.getCount() - target);
                          target = 0;
                      }
                  }
              }
              ItemStack resultForReward = isIngredient.copy();
              RewardForDiscardingItemImplementation.LoseItemEvent event = new RewardForDiscardingItemImplementation.LoseItemEvent(resultForReward);
              MinecraftForge.EVENT_BUS.post(event);
          }
      }