forked from mtcontrib/plantlife_modpack
use swap_node() where possible, for speed
This commit is contained in:
@ -58,7 +58,7 @@ abstract_molehills.place_molehill = function(pos)
|
||||
and minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z-1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z+1}).name ~= "air"
|
||||
and minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z-1}).name ~= "air" then
|
||||
minetest.set_node(right_here, {name="molehills:molehill"})
|
||||
minetest.swap_node(right_here, {name="molehills:molehill"})
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user