1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-13 21:40:19 +02:00

use swap_node() where possible, for speed

This commit is contained in:
Vanessa Dannenberg
2018-10-25 10:27:54 -04:00
parent 2c7a776c7f
commit 77093e428a
22 changed files with 156 additions and 156 deletions

View File

@ -38,9 +38,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
nn = minetest.get_node({x=x,y=ground_y,z=z}).name
-- If desert sand, add dry shrub
if nn == "default:dirt_with_grass" then
minetest.set_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
minetest.swap_node(p,{name="cavestuff:pebble_"..pr:next(1,2), param2=math.random(0,3)})
elseif nn == "default:desert_sand" then
minetest.set_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
minetest.swap_node(p,{name="cavestuff:desert_pebble_"..pr:next(1,2), param2=math.random(0,3)})
end
end
end