Craftings, Randomly spawning amonguses and more
This commit is contained in:
@@ -133,4 +133,37 @@ minetest.register_decoration({
|
||||
flags = "place_center_x, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
--minetest.register_abm({
|
||||
-- label = "Spawn random entities",
|
||||
-- nodenames = {"group:soil", "group:crumbly", "group:choppy", "group:snappy", "group:cracky"},
|
||||
-- interval = 15,
|
||||
-- chance = 50,
|
||||
-- action = function(pos)
|
||||
-- local r = math.random(1, 500)
|
||||
-- if r <= 50 then
|
||||
-- minetest.add_entity({x = pos.x + math.random(-10, 10),
|
||||
-- y = pos.y + 1,
|
||||
-- z = pos.z + math.random(-10, 10)}, "amogus_entities:amogus")
|
||||
-- minetest.sound_play("amogus_sound", {
|
||||
-- pos = pos,
|
||||
-- gain = 1.0,
|
||||
-- max_hear_distance = 5
|
||||
-- })
|
||||
|
||||
-- end
|
||||
-- end
|
||||
--})
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
--local is_newchunk = true
|
||||
--for , pos in ipairs(minetest.find_nodes_in_area(minp, maxp, "mymod:amogus_spawner")) do
|
||||
--is_new_chunk = false
|
||||
-- break
|
||||
--end
|
||||
--if is_new_chunk then
|
||||
for i = 1, math.random(10, 15) do
|
||||
minetest.add_entity({x = minp.x + math.random(16), y = minp.y + 1, z = minp.z + math.random(16)}, "amogus_entities:amogus")
|
||||
--minetest.sound_play("amogus_sound", { pos = pos,gain = 1.0,max_hear_distance = 5})
|
||||
end
|
||||
--end
|
||||
end)
|
||||
Reference in New Issue
Block a user