Add mob spawning underground
parent
66a5c55ba7
commit
efc7ddb4e5
|
@ -1,2 +1,8 @@
|
||||||
|
# Folders
|
||||||
.vscode
|
.vscode
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# Files
|
||||||
|
ns_vl_caves_schist_large.png
|
||||||
|
ns_vl_caves_gneiss_large.png
|
||||||
|
show.py
|
||||||
|
|
21
init.lua
21
init.lua
|
@ -304,6 +304,16 @@ function internal.register_ore(def)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function internal.register_monster_spawn(name, biomes, interval, chance, aoc)
|
||||||
|
return mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:" .. name, "overworld", "ground", biomes, 0, 7,
|
||||||
|
interval, chance, aoc, mcl_vars.mg_overworld_min,
|
||||||
|
mcl_vars.mg_overworld_max, nil, function(self, pos)
|
||||||
|
minetest.debug("Spawned " .. name .. " at position " .. minetest.pos_to_string(pos))
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
-- Register a new deepslate-like stone type.
|
-- Register a new deepslate-like stone type.
|
||||||
-- {
|
-- {
|
||||||
-- -- Name of the deepslate type. Required.
|
-- -- Name of the deepslate type. Required.
|
||||||
|
@ -528,6 +538,17 @@ function internal.overwrite_register_biome()
|
||||||
OLD_REGISTER_BIOME(slate_def)
|
OLD_REGISTER_BIOME(slate_def)
|
||||||
OLD_REGISTER_BIOME(schist_def)
|
OLD_REGISTER_BIOME(schist_def)
|
||||||
OLD_REGISTER_BIOME(gneiss_def)
|
OLD_REGISTER_BIOME(gneiss_def)
|
||||||
|
|
||||||
|
local biome_names = { slate_def.name, schist_def.name, gneiss_def.name }
|
||||||
|
|
||||||
|
internal.register_monster_spawn("zombie", biome_names, 30, 1000, 4)
|
||||||
|
internal.register_monster_spawn("rover", biome_names, 30, 100, 2)
|
||||||
|
internal.register_monster_spawn("skeleton", biome_names, 20, 800, 2)
|
||||||
|
internal.register_monster_spawn("spider", biome_names, 30, 1000, 2)
|
||||||
|
internal.register_monster_spawn("stalker", biome_names, 20, 1000, 2)
|
||||||
|
internal.register_monster_spawn("villager_zombie", biome_names, 30, 50, 4)
|
||||||
|
internal.register_monster_spawn("zombie", biome_names, 30, 1000, 4)
|
||||||
|
internal.register_monster_spawn("baby_zombie", biome_names, 30, 50, 4)
|
||||||
else
|
else
|
||||||
return OLD_REGISTER_BIOME(def)
|
return OLD_REGISTER_BIOME(def)
|
||||||
end
|
end
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -2,5 +2,5 @@ name=ns_vl_caves
|
||||||
description=Custom caves in VoxeLibre
|
description=Custom caves in VoxeLibre
|
||||||
author=Noordstar
|
author=Noordstar
|
||||||
title=VoxeLibre caves
|
title=VoxeLibre caves
|
||||||
depends=mcl_core,mcl_init,mcl_raw_ores,mcl_sounds,mcl_util,ns_cavegen
|
depends=mcl_core,mcl_init,mcl_mobs,mcl_raw_ores,mcl_sounds,mcl_util,ns_cavegen
|
||||||
optional_depends=
|
optional_depends=
|
Loading…
Reference in New Issue