Use stripped_tree.has_stripped with the chisel tool

This commit is contained in:
2025-12-09 11:06:15 +01:00
parent 8a0e861351
commit 990ddbfd62

View File

@@ -36,16 +36,7 @@ if stripped_tree.enable_chisel then
return return
end end
local node = core.get_node(pos).name if stripped_tree.has_stripped(pos) then
local mod_name, node_name = unpack(node:split(":"))
-- Before concatenating check for nil
if not mod_name then return end
if not node_name then return end
local has_stripped = core.registered_nodes[mod_name .. ":" .. "stripped_" .. node_name]
if has_stripped then
stripped_tree.swap_node(pos, user, core.settings:get_bool("creative_mode"), itemstack) stripped_tree.swap_node(pos, user, core.settings:get_bool("creative_mode"), itemstack)
if not core.settings:get_bool("creative_mode") then if not core.settings:get_bool("creative_mode") then