-
Notifications
You must be signed in to change notification settings - Fork 8
/
mobs_fish.lua
72 lines (64 loc) · 1.89 KB
/
mobs_fish.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- Add extra areas where fish spawn
local l_spawn_chance = 10000
local l_water_level = tonumber(minetest.settings:get("water_level")) or 1
local l_max_height_Earth = 777 -- Vacuum sometimes extends well below 1k
local l_max_height_Mars = 15777
local l_min_height_Mars = 11111
-- Extend Earth
mobs:spawn({
name = "mobs_fish:clownfish",
nodes = {
"default:water_source", "default:water_flowing",
"default:river_water_source", "default:river_water_flowing"
},
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
min_light = 5,
interval = 30,
chance = l_spawn_chance,
max_height = l_max_height_Earth,
min_height = l_water_level,
active_object_count = 5
})
mobs:spawn({
name = "mobs_fish:tropical",
nodes = {
"default:water_source", "default:water_flowing",
"default:river_water_source", "default:river_water_flowing"
},
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
min_light = 5,
interval = 30,
chance = l_spawn_chance,
max_height = l_max_height_Earth,
min_height = l_water_level,
active_object_count = 5
})
-- Extend Mars
mobs:spawn({
name = "mobs_fish:clownfish",
nodes = {
"default:water_source", "default:water_flowing",
"default:river_water_source", "default:river_water_flowing"
},
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
min_light = 5,
interval = 30,
chance = l_spawn_chance,
max_height = l_max_height_Mars,
min_height = l_min_height_Mars,
active_object_count = 5
})
mobs:spawn({
name = "mobs_fish:tropical",
nodes = {
"default:water_source", "default:water_flowing",
"default:river_water_source", "default:river_water_flowing"
},
neighbors = {"default:sand","default:dirt","group:seaplants","group:seacoral"},
min_light = 5,
interval = 30,
chance = l_spawn_chance,
max_height = l_max_height_Mars,
min_height = l_min_height_Mars,
active_object_count = 5
})