Make it possible to pick up items when a chisel is held in hand

This commit is contained in:
2025-12-09 22:33:49 +01:00
parent 8850f13ce0
commit 0b5e21a74e

View File

@@ -29,6 +29,11 @@ core.register_tool(
sound = {breaks = "default_tool_breaks"}, sound = {breaks = "default_tool_breaks"},
stack_max = 1, stack_max = 1,
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type == "object" then
pointed_thing.ref:punch(user, 1.0, { full_punch_interval=1.0}, nil)
return user:get_wielded_item()
end
if pointed_thing.type ~= "node" then return end if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.under local pos = pointed_thing.under