minetest_game icon indicating copy to clipboard operation
minetest_game copied to clipboard

furnace replacements does not return more than single count of return item

Open Golutazem opened this issue 4 years ago • 2 comments

When replacements are in specified in a register_craft , and the player uses more than a single count of fuel, only a single count of the post-burn replacement item is returned to the player.

I see this with ethanol in farming_redo corn.lua. If you put 2 or more bottles of ethanol in the furnace as fuel, you only get a single glass_bottle returned after they are burned.

This is tested with Minetest and Game 5.2.0.

The registration code from farming redo is

minetest.register_craft({
	type = "fuel",
	recipe = "farming:bottle_ethanol",
	burntime = 80, --240,
	replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}}
})

Golutazem avatar Apr 30 '20 19:04 Golutazem

I can't reproduce this exactly, but I do see different behavior.

When the furnace does not have any fuel, it never moves the replacement item to the destination, but it remains in the fuel slot instead. This can be replicated with a lava bucket.

Only when you can stack the fuel items and there is still fuel in the furnace will it move the replacement items to the destination. This is because the replacements table in furnace.lua is always empty unless there is still fuel in the furnace.

I'm not sure this is really a problem?

orbea avatar May 01 '20 01:05 orbea

Are you sure you're using Minetest Game 5.2.0? This was fixed in https://github.com/minetest/minetest_game/commit/72697119116fb3be38b35c97b637afd7d0cb4cbf.

@orbea that's the intended behavior. https://github.com/minetest/minetest/blob/3014e8b33b3d14165cc207be13631f4ee9a8fd2e/doc/lua_api.txt#L5071-L5073

p-ouellette avatar Jun 25 '20 16:06 p-ouellette