Исправление бага с вылетом игры при нажатии ПКМ на полые блоки дерева
This commit is contained in:
parent
c76dc71284
commit
88ea992984
@ -412,8 +412,21 @@ local function make_stripped_trunk(itemstack, placer, pointed_thing)
|
||||
|
||||
if noddef._mcl_stripped_variant == nil then
|
||||
return itemstack
|
||||
else
|
||||
if minetest.registered_nodes[noddef._mcl_stripped_variant] == nil then
|
||||
-- vl_hollow_logs:acaciatree_hollow -> vl_hollow_logs:stripped_acacia_hollow
|
||||
|
||||
local node_name_try = "vl_hollow_logs:stripped_" .. string.sub(node_name, 16, -12) .. "_hollow"
|
||||
--core.chat_send_all(node_name_try)
|
||||
if minetest.registered_nodes[node_name_try] == nil then
|
||||
return
|
||||
else
|
||||
minetest.swap_node(pointed_thing.under, {name=node_name_try, param2=node.param2})
|
||||
end
|
||||
else
|
||||
minetest.swap_node(pointed_thing.under, {name=noddef._mcl_stripped_variant, param2=node.param2})
|
||||
end
|
||||
|
||||
if minetest.get_item_group(node_name, "waxed") ~= 0 then
|
||||
awards.unlock(placer:get_player_name(), "mcl:wax_off")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user