docs: public static void burnInventory(EntityPlayerMP player, int burnAmount, ItemStack input)
      {
          if (!fuelCaches.containsKey(player))
              fuelCaches.put(player, -burnAmount);
          else
              fuelCaches.put(player, fuelCaches.get(player) - burnAmount);
          int index = 0;
          while (fuelCaches.get(player) < 0 && index < player.inventory.mainInventory.size())
          {
              ItemStack is = player.inventory.mainInventory.get(index);
              if (is != null)
              {
                  int burnTime = TileEntityFurnace.getItemBurnTime(is);
                  if (burnTime != 0)
                  {
                      // Consume item:
                      if (is.getCount() > 1)
                          is.setCount(is.getCount() - 1);
                      else
                      {
                          // If this is a bucket of lava, we need to consume the lava but leave the bucket.
                          if (is.getItem() == Items.LAVA_BUCKET)
                          {
                              // And if we're cooking wet sponge, we need to leave the bucket filled with water.
                              if (input.getItem() == Item.getItemFromBlock(Blocks.SPONGE) && input.getMetadata() == 1)
                                  player.inventory.mainInventory.set(index, new ItemStack(Items.WATER_BUCKET));
                              else
                                  player.inventory.mainInventory.set(index, new ItemStack(Items.BUCKET));
                          }
                          else
                              player.inventory.mainInventory.get(index).setCount(0);
                          index++;
                      }
                      fuelCaches.put(player, fuelCaches.get(player) + burnTime);
                  }
                  else
                      index++;
              }
              else
                  index++;
          }
      }