1
0
Fork 0

Fix furnace not cooking when hopper inserts item

This commit is contained in:
Wuzzy 2017-06-12 22:51:17 +02:00
parent 38e30fee8d
commit 7ecae53502
2 changed files with 9 additions and 1 deletions

View File

@ -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`: 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=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=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 * `container=1`: Other/unspecified container type
* `spawn_egg=1`: Spawn egg * `spawn_egg=1`: Spawn egg

View File

@ -308,6 +308,10 @@ minetest.register_abm({
end end
if slot_id then if slot_id then
mcl_util.move_item_container(pos, "main", slot_id, downpos) 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
end, end,
}) })
@ -366,6 +370,8 @@ minetest.register_abm({
if slot_id then if slot_id then
mcl_util.move_item_container(pos, "main", slot_id, front, "fuel") mcl_util.move_item_container(pos, "main", slot_id, front, "fuel")
end 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
end end
}) })