clams spawn less naturally and grow instead
This commit is contained in:
parent
625cb7fefc
commit
e6112839b1
@ -222,6 +222,26 @@ minetest.register_abm( -- grass expands
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_abm( -- clams grow
|
||||||
|
{
|
||||||
|
nodenames = {"default:clam"},
|
||||||
|
interval = 20,
|
||||||
|
chance = 160,
|
||||||
|
action = function(pos, node)
|
||||||
|
local rx = math.random(0, 2) - 1
|
||||||
|
local rz = math.random(0, 2) - 1
|
||||||
|
|
||||||
|
local edgepos = {x = pos.x+rx, y = pos.y, z = pos.z+rz}
|
||||||
|
local downpos = {x = pos.x+rx, y = pos.y-1, z = pos.z+rz}
|
||||||
|
local edgenode = minetest.get_node(edgepos)
|
||||||
|
local downnode = minetest.get_node(downpos)
|
||||||
|
|
||||||
|
if edgenode.name == "air" and downnode.name ~= "air" and downnode.buildable_to == false and walkable == true then
|
||||||
|
minetest.set_node(edgepos, {name = "default:clam"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_abm( -- cactus grows
|
minetest.register_abm( -- cactus grows
|
||||||
{
|
{
|
||||||
nodenames = {"default:cactus"},
|
nodenames = {"default:cactus"},
|
||||||
|
@ -517,10 +517,10 @@ minetest.register_decoration(
|
|||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"default:sand", "default:gravel"},
|
place_on = {"default:sand", "default:gravel"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
fill_ratio = 0.04,
|
fill_ratio = 0.02,
|
||||||
biomes = {"Grassland Ocean", "Gravel Beach"},
|
biomes = {"Grassland Ocean", "Gravel Beach"},
|
||||||
decoration = {"default:clam"},
|
decoration = {"default:clam"},
|
||||||
y_min = -32000,
|
y_min = 0,
|
||||||
y_max = 1,
|
y_max = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user