Skip to content

Commit 1886d29

Browse files
committedJul 5, 2016
Default/mapgen: Clean up ore registrations
Re-order registrations Add and improve comments Change sand blob ymax to 0 as sand does not always rise above 0 Remove dirt blobs from sandstone as it is unsuitable for many sandstone biomes and ugly in stony sandstone desert Change ymax of first iron region to 0
1 parent 21b457c commit 1886d29

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed
 

‎mods/default/mapgen.lua

+45-41
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebr
4242
-- Register ores
4343
--
4444

45-
-- All mapgens except singlenode
46-
-- Blob ore first to avoid other ores inside blobs
47-
4845
function default.register_ores()
46+
-- Blob ores
47+
-- These first to avoid other ores in blobs
4948

5049
-- Clay
50+
-- This first to avoid clay in sand blobs
5151

5252
minetest.register_ore({
5353
ore_type = "blob",
@@ -78,7 +78,7 @@ function default.register_ores()
7878
clust_scarcity = 16 * 16 * 16,
7979
clust_size = 5,
8080
y_min = -31,
81-
y_max = 4,
81+
y_max = 0,
8282
noise_threshold = 0.0,
8383
noise_params = {
8484
offset = 0.5,
@@ -95,7 +95,7 @@ function default.register_ores()
9595
minetest.register_ore({
9696
ore_type = "blob",
9797
ore = "default:dirt",
98-
wherein = {"default:stone", "default:sandstone"},
98+
wherein = {"default:stone"},
9999
clust_scarcity = 16 * 16 * 16,
100100
clust_size = 5,
101101
y_min = -31,
@@ -132,6 +132,8 @@ function default.register_ores()
132132
},
133133
})
134134

135+
-- Scatter ores
136+
135137
-- Coal
136138

137139
minetest.register_ore({
@@ -166,7 +168,7 @@ function default.register_ores()
166168
clust_num_ores = 3,
167169
clust_size = 2,
168170
y_min = -15,
169-
y_max = 2,
171+
y_max = 0,
170172
})
171173

172174
minetest.register_ore({
@@ -202,48 +204,61 @@ function default.register_ores()
202204
y_max = -64,
203205
})
204206

205-
--Mese
207+
-- Copper
206208

207209
minetest.register_ore({
208210
ore_type = "scatter",
209-
ore = "default:stone_with_mese",
211+
ore = "default:stone_with_copper",
210212
wherein = "default:stone",
211-
clust_scarcity = 18 * 18 * 18,
212-
clust_num_ores = 3,
213-
clust_size = 2,
214-
y_min = -255,
215-
y_max = -64,
213+
clust_scarcity = 12 * 12 * 12,
214+
clust_num_ores = 4,
215+
clust_size = 3,
216+
y_min = -63,
217+
y_max = -16,
216218
})
217219

218220
minetest.register_ore({
219221
ore_type = "scatter",
220-
ore = "default:stone_with_mese",
222+
ore = "default:stone_with_copper",
221223
wherein = "default:stone",
222-
clust_scarcity = 14 * 14 * 14,
224+
clust_scarcity = 9 * 9 * 9,
223225
clust_num_ores = 5,
224226
clust_size = 3,
225227
y_min = -31000,
226-
y_max = -256,
228+
y_max = -64,
227229
})
228230

231+
-- Gold
232+
229233
minetest.register_ore({
230234
ore_type = "scatter",
231-
ore = "default:mese",
235+
ore = "default:stone_with_gold",
232236
wherein = "default:stone",
233-
clust_scarcity = 36 * 36 * 36,
237+
clust_scarcity = 15 * 15 * 15,
234238
clust_num_ores = 3,
235239
clust_size = 2,
240+
y_min = -255,
241+
y_max = -64,
242+
})
243+
244+
minetest.register_ore({
245+
ore_type = "scatter",
246+
ore = "default:stone_with_gold",
247+
wherein = "default:stone",
248+
clust_scarcity = 13 * 13 * 13,
249+
clust_num_ores = 5,
250+
clust_size = 3,
236251
y_min = -31000,
237-
y_max = -1024,
252+
y_max = -256,
238253
})
239254

240-
-- Gold
255+
-- Mese crystal
241256

242257
minetest.register_ore({
243258
ore_type = "scatter",
244-
ore = "default:stone_with_gold",
259+
ore = "default:stone_with_mese",
245260
wherein = "default:stone",
246-
clust_scarcity = 15 * 15 * 15,
261+
clust_scarcity = 18 * 18 * 18,
247262
clust_num_ores = 3,
248263
clust_size = 2,
249264
y_min = -255,
@@ -252,9 +267,9 @@ function default.register_ores()
252267

253268
minetest.register_ore({
254269
ore_type = "scatter",
255-
ore = "default:stone_with_gold",
270+
ore = "default:stone_with_mese",
256271
wherein = "default:stone",
257-
clust_scarcity = 13 * 13 * 13,
272+
clust_scarcity = 14 * 14 * 14,
258273
clust_num_ores = 5,
259274
clust_size = 3,
260275
y_min = -31000,
@@ -285,28 +300,17 @@ function default.register_ores()
285300
y_max = -256,
286301
})
287302

288-
-- Copper
303+
-- Mese block
289304

290305
minetest.register_ore({
291306
ore_type = "scatter",
292-
ore = "default:stone_with_copper",
293-
wherein = "default:stone",
294-
clust_scarcity = 12 * 12 * 12,
295-
clust_num_ores = 4,
296-
clust_size = 3,
297-
y_min = -63,
298-
y_max = -16,
299-
})
300-
301-
minetest.register_ore({
302-
ore_type = "scatter",
303-
ore = "default:stone_with_copper",
307+
ore = "default:mese",
304308
wherein = "default:stone",
305-
clust_scarcity = 9 * 9 * 9,
306-
clust_num_ores = 5,
307-
clust_size = 3,
309+
clust_scarcity = 36 * 36 * 36,
310+
clust_num_ores = 3,
311+
clust_size = 2,
308312
y_min = -31000,
309-
y_max = -64,
313+
y_max = -1024,
310314
})
311315
end
312316

0 commit comments

Comments
 (0)
Please sign in to comment.