Only reset output if input is empty

This commit is contained in:
Chris Page 2023-08-01 22:48:45 +01:00 committed by the-real-herowl
parent ce51b6df44
commit bf19e8ec45
1 changed files with 5 additions and 1 deletions

View File

@ -289,8 +289,12 @@ minetest.register_node("mcl_stonecutter:stonecutter", {
local input = inv:get_stack("input", 1)
input:take_item()
inv:set_stack("input", 1, input)
if input:get_count() == 0 then
meta:set_string("cut_stone", nil)
end
else
meta:set_string("cut_stone", nil)
end
meta:set_string("cut_stone", nil)
update_stonecutter_slots(meta)
end,
on_construct = function(pos)