Merge pull request 'Fix Honeycomb Right-click' (#4614) from fix-honeycomb into master

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4614
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
the-real-herowl 2024-08-31 19:43:41 +02:00
commit 93165a042b

View file

@ -15,13 +15,13 @@ function mcl_honey.wax_block(pos, node, player, itemstack)
end end
local def = minetest.registered_nodes[node.name] local def = minetest.registered_nodes[node.name]
if not def then return end
if def and def._mcl_waxed_variant then -- Handle right-clicking nodes
node.name = def._mcl_waxed_variant local new_stack = mcl_util.call_on_rightclick(itemstack, player, {type = "node", under = pos})
else if new_stack and new_stack ~= itemstack then return end
return
end
if not def._mcl_waxed_variant then return end
node.name = def._mcl_waxed_variant node.name = def._mcl_waxed_variant
minetest.set_node(pos, node) minetest.set_node(pos, node)
awards.unlock(player:get_player_name(), "mcl:wax_on") awards.unlock(player:get_player_name(), "mcl:wax_on")