Use stripped_tree.swap_node with the chisel tool

This commit is contained in:
2025-12-09 11:04:30 +01:00
parent 9fa0f17f63
commit 8a0e861351

View File

@@ -46,19 +46,9 @@ if stripped_tree.enable_chisel then
local has_stripped = core.registered_nodes[mod_name .. ":" .. "stripped_" .. node_name] local has_stripped = core.registered_nodes[mod_name .. ":" .. "stripped_" .. node_name]
if has_stripped then if has_stripped then
local stripped = mod_name .. ":" .. "stripped_" .. node_name stripped_tree.swap_node(pos, user, core.settings:get_bool("creative_mode"), itemstack)
core.swap_node(pos, {name = stripped})
if not core.settings:get_bool("creative_mode") then if not core.settings:get_bool("creative_mode") then
local inv = user:get_inventory()
-- Check for room in inv, if not, drop item
if inv:room_for_item("main", "default:tree_bark") then
inv:add_item("main", {name = "default:tree_bark"})
else
core.add_item(pos, "default:tree_bark")
end
itemstack:add_wear(65535 / 299) -- 300 uses itemstack:add_wear(65535 / 299) -- 300 uses
end end