25 lines
510 B
Lua
25 lines
510 B
Lua
local ghost_bones_only = minetest.settings:get_bool("mobs_ghost_redo_bones_only", false)
|
|
|
|
local DAWN = 4500 / 24000
|
|
local DUSK = 19500 / 24000
|
|
|
|
local near
|
|
if ghost_bones_only then
|
|
near = {"bones:bones", "mobs_humans:human_bones"}
|
|
else
|
|
near = {"any"}
|
|
end
|
|
|
|
spawnit.register({
|
|
entity_name = "mobs_ghost_redo:ghost",
|
|
chance = 300,
|
|
within = { "any" },
|
|
on = { "any" },
|
|
near = near,
|
|
max_in_area = 2,
|
|
min_time_of_day = DUSK,
|
|
max_time_of_day = DAWN,
|
|
min_player_distance = 12,
|
|
spawn_in_protected = false,
|
|
})
|