1
0
Fork 0

Rework code

This commit is contained in:
teknomunk 2024-08-28 18:08:43 -05:00
parent a82200c7ac
commit 3d01013375
1 changed files with 3 additions and 5 deletions

View File

@ -15,15 +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 if def.on_rightclick then
node.name = def._mcl_waxed_variant
elseif def and def.on_rightclick then
return def.on_rightclick(pos, node, player, itemstack) return def.on_rightclick(pos, node, player, itemstack)
else
return
end 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")