From 7ecae53502c5f5051e0392bb6e57bdb5b164546d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Jun 2017 22:51:17 +0200 Subject: [PATCH] Fix furnace not cooking when hopper inserts item --- GROUPS.md | 4 +++- mods/ITEMS/mcl_hoppers/init.lua | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/GROUPS.md b/GROUPS.md index 9ea115cc1..d95611603 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -133,7 +133,9 @@ These groups are used mostly for informational purposes * `container`: Node is a container which physically stores items within and has at least 1 inventory * `container=2`: Has one inventory with list name `"main"`. Items can be placed and taken freely * `container=3`: Same as `container=2`, but shulker boxes can not be inserted - * `container=4`: Furnace-like, has lists `"src"`, `"fuel"` and `"dst"` + * `container=4`: Furnace-like, has lists `"src"`, `"fuel"` and `"dst"`. + It is expected that this also reacts on `on_timer`; + the node timer must be started from other mods when they add into `"src"` or `"fuel"` * `container=1`: Other/unspecified container type * `spawn_egg=1`: Spawn egg diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 92beb3d95..1bd2dd973 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -308,6 +308,10 @@ minetest.register_abm({ end if slot_id then mcl_util.move_item_container(pos, "main", slot_id, downpos) + if g == 4 then + -- Start furnace's timer function, it will sort out whether furnace can burn or not. + minetest.get_node_timer(downpos):start(1.0) + end end end, }) @@ -366,6 +370,8 @@ minetest.register_abm({ if slot_id then mcl_util.move_item_container(pos, "main", slot_id, front, "fuel") end + -- Start furnace's timer function, it will sort out whether furnace can burn or not. + minetest.get_node_timer(front):start(1.0) end end })