How to make a custom smelting recipe like the sponge smelting that fills water buckets in 1.13

When you smelt sponge, if there is a bucket in the fuel slot for the furnace, it will fill it with water. How can you do this with a custom smelting recipe?

Looking at the recipe file for sponge, it doesn't say anything about this

{
  "type": "smelting",
  "ingredient": {
    "item": "minecraft:wet_sponge"
  },
  "result": "minecraft:sponge",
  "experience": 0.15,
  "cookingtime": 200
}

Is this hardcoded in the game or is it possible for a custom recipe to do this? If it's not possible, are there any alternatives?


Solution 1:

I have no source for this, but I'm pretty sure I heard once that it's hardcoded. That's one of the issues that smelting recipes still have.
It would probably be complicated to program into recipe files, since it is an output in the fuel slot, which depends on the item in both input slots.