Luanti/Minetest crashes when digging the placed Gold Crown node.
Error:
Runtime error from mod 'craftoplus' in callback node_on_dig():
mods/craftoplus/items/gold/gold_crown.lua:32:
attempt to call field 'placed_tool_on_dig' (a nil value)
Stack traceback:
[C]: in function 'placed_tool_on_dig'
mods/craftoplus/items/gold/gold_crown.lua:32: in function <mods/craftoplus/items/gold/gold_crown.lua:31>
It looks like craftoplus.placed_tool_on_dig is nil or not defined/loaded.
I was able to stop the crash by adding a nil check and fallback behavior, but I think the mod should define this function or guard the call.
Possible fix:
on_dig = function(pos, node, digger)
if craftoplus.placed_tool_on_dig then
return craftoplus.placed_tool_on_dig(pos, node, digger, dp.gold_crown)
end
local meta = core.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack("main", 1)
core.remove_node(pos)
if not stack:is_empty() then
core.add_item(pos, stack)
else
core.add_item(pos, dp.gold_crown)
end
end,
This happened on 2026-06-04 at 18:01:26 on my server.
corona de oro al romper da error
Hi, I found a crash bug in craftoplus.
Luanti/Minetest crashes when digging the placed Gold Crown node.
Error:
Runtime error from mod 'craftoplus' in callback node_on_dig(): mods/craftoplus/items/gold/gold_crown.lua:32: attempt to call field 'placed_tool_on_dig' (a nil value)
Stack traceback: [C]: in function 'placed_tool_on_dig' mods/craftoplus/items/gold/gold_crown.lua:32: in function <mods/craftoplus/items/gold/gold_crown.lua:31>
The problematic code seems to be:
on_dig = function(pos, node, digger) craftoplus.placed_tool_on_dig(pos, node, digger, dp.gold_crown) end,
It looks like craftoplus.placed_tool_on_dig is nil or not defined/loaded.
I was able to stop the crash by adding a nil check and fallback behavior, but I think the mod should define this function or guard the call.
Possible fix:
on_dig = function(pos, node, digger) if craftoplus.placed_tool_on_dig then return craftoplus.placed_tool_on_dig(pos, node, digger, dp.gold_crown) end
end,
This happened on 2026-06-04 at 18:01:26 on my server.