mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-26 18:50:38 +01:00
9 lines
322 B
Lua
9 lines
322 B
Lua
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
|
|
if newnode.name ~= "default:torch" or minetest.get_item_group(oldnode.name, "water") == 0 then
|
|
return
|
|
end
|
|
minetest.remove_node(pos, newnode)
|
|
minetest.set_node(pos, oldnode)
|
|
minetest.add_item(pos, "default:torch")
|
|
end)
|