From af5a16d615feb96feddc0917e679531956028021 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 9 Dec 2025 18:28:28 +0100 Subject: [PATCH] Make the chiseling machine undiggable if its inventory is not empty --- chiseling_machine.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chiseling_machine.lua b/chiseling_machine.lua index e57a997..2dec68c 100644 --- a/chiseling_machine.lua +++ b/chiseling_machine.lua @@ -41,6 +41,13 @@ core.register_node( core.get_node_timer(pos):start(1.0) end, + can_dig = function(pos) + local meta = core.get_meta(pos) + local inv = meta:get_inventory() + + return inv:is_empty("dst") and inv:is_empty("src") + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) local inv = core.get_meta(pos):get_inventory() local src_stack = inv:get_stack("src", 1)