1. I added support for craft formula replacements in the default mod by setting the output value of the fuel to the "decremented input" return value of get_craft_result rather than the input stack with one item removed:
- Code: Select all
(around line 1500)
local fuel = nil
local cooked = nil
local fuellist = inv:get_list("fuel")
local srclist = inv:get_list("src")
--to--
local fuel = nil
local afterfuel
local cooked = nil
local fuellist = inv:get_list("fuel")
local srclist = inv:get_list("src")
fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
--to--
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
local stack = inv:get_stack("fuel", 1)
stack:take_item()
inv:set_stack("fuel", 1, stack)
--to--
inv:set_stack("fuel", 1, afterfuel.items[1])
2. Then, I added a line to the fuel craft definition for the lava bucket in the bucket mod to replace the lava with an empty bucket:
- Code: Select all
(line 103)
minetest.register_craft({
type = "fuel",
recipe = "bucket:bucket_lava",
burntime = 60,
})
--to--
minetest.register_craft({
type = "fuel",
recipe = "bucket:bucket_lava",
burntime = 60,
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
})
In any case, something along the lines of the changes that I made to the default mod should probably be implemented in the official version so that other mods will be able to supply fuel to furnaces without using up containers. In this case, I'm not seeing any reason for burning the buckets along with the lava when smelting, but then the changes were easy enough to make that I wonder why no-one else seems to have made them yet…