diff options
Diffstat (limited to 'cavestuff')
-rw-r--r-- | cavestuff/mapgen.lua | 4 | ||||
-rw-r--r-- | cavestuff/nodes.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cavestuff/mapgen.lua b/cavestuff/mapgen.lua index fc890b3..3be9f31 100644 --- a/cavestuff/mapgen.lua +++ b/cavestuff/mapgen.lua @@ -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 diff --git a/cavestuff/nodes.lua b/cavestuff/nodes.lua index d4be0f2..1c6bc29 100644 --- a/cavestuff/nodes.lua +++ b/cavestuff/nodes.lua @@ -97,7 +97,7 @@ minetest.register_node("cavestuff:stalactite_1",{ if minetest.get_node(pt.under).name=="default:stone" and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air" and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then - minetest.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)}) + minetest.swap_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)}) if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end |