forked from vlapsley/australia
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbiome_arnhem_land.lua
executable file
·142 lines (125 loc) · 3.13 KB
/
biome_arnhem_land.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
-- mods/australia/biome_arnhem_land.lua
minetest.register_biome({
name = "arnhem_land",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
node_river_water = "australia:muddy_river_water_source",
y_min = 4,
y_max = 35,
heat_point = 60,
humidity_point = 80,
})
--
-- Register ores
--
-- All mapgens except singlenode
-- Blob ore first to avoid other ores inside blobs
-- Uranium from Technic modpack: technic_worldgen mod
if minetest.get_modpath("technic_worldgen") then
minetest.register_ore({
ore_type = "scatter",
ore = "technic:mineral_uranium",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 4,
clust_size = 3,
biomes = {"arnhem_land"},
y_min = -64,
y_max = 35,
noise_params = {
offset = 0,
scale = 1,
spread = {x = 100, y = 100, z = 100},
seed = 420,
octaves = 3,
persist = 0.7
},
noise_threshold = 0.6,
})
end
--
-- Decorations
--
local function register_grass_decoration(offset, scale, length)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = offset,
scale = scale,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 3,
persist = 0.6
},
biomes = {"arnhem_land"},
y_min = 4,
y_max = 35,
decoration = "default:grass_"..length,
})
end
-- Grasses
register_grass_decoration(-0.03, 0.09, 5)
register_grass_decoration(-0.015, 0.075, 4)
register_grass_decoration(0, 0.06, 3)
register_grass_decoration(0.015, 0.045, 2)
register_grass_decoration(0.03, 0.03, 1)
--
-- Trees
--
-- Darwin Woollybutt
aus.schematics.darwin_woollybutt_tree = {}
local max_r = 4
local ht = 5
local fruit = nil
local limbs = nil
local tree = "australia:darwin_woollybutt_tree"
local leaves = "australia:darwin_woollybutt_leaves"
for r = 3,max_r do
local schem = aus.generate_tree_schematic(6, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs)
push(aus.schematics.darwin_woollybutt_tree, schem)
minetest.register_decoration({
deco_type = "schematic",
sidelen = 80,
place_on = {"default:dirt_with_grass"},
y_min = 8,
y_max = 35,
fill_ratio = (max_r-r+1)/10000,
biomes = {"arnhem_land"},
schematic = schem,
flags = "place_center_x, place_center_z",
rotation = "random",
})
end
-- River Oak
aus.schematics.river_oak_small_tree = {}
local max_r = 4
local ht = 6
local fruit = nil
local limbs = false
local tree = "australia:river_oak_tree"
local leaves = "australia:river_oak_leaves"
for r = 3,max_r do
local schem = aus.generate_tree_schematic(2, {x=r, y=ht, z=r}, tree, leaves, fruit, limbs)
push(aus.schematics.river_oak_small_tree, schem)
minetest.register_decoration({
deco_type = "schematic",
sidelen = 80,
place_on = {"default:dirt_with_grass"},
y_min = 12,
y_max = 35,
fill_ratio = (max_r-r+1)/12000,
biomes = {"arnhem_land"},
schematic = schem,
flags = "place_center_x, place_center_z",
rotation = "random",
})
end