summaryrefslogtreecommitdiff
path: root/mapgen.lua
blob: 1557b55c556113a3025dbea0728ec71de51d74d4 (plain)
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

local mg_params = minetest.get_mapgen_params()
if mg_params.mgname ~= "v6" and mg_params.mgname ~= "singlenode" then
	minetest.register_decoration({
		deco_type = "simple",
		place_on = { "default:dirt_with_grass" },
		sidelen = 16,
		noise_params = {
			offset = -0.02,
			scale = 0.02,
			spread = {x = 200, y = 200, z = 200},
			seed = 90459126,
			octaves = 3,
			persist = 0.6
		},
		biomes = {"grassland", "grassland",
			"deciduous_forest", "coniferous_forest"},
		y_min = 1,
		y_max = 31000,
		decoration = "crops:melon_plant_4"
	})
	minetest.register_decoration({
		deco_type = "simple",
		place_on = { "default:dirt_with_grass" },
		sidelen = 16,
		noise_params = {
			offset = -0.02,
			scale = 0.02,
			spread = {x = 200, y = 200, z = 200},
			seed = 26294592,
			octaves = 3,
			persist = 0.6
		},
		biomes = {"deciduous_forest", "coniferous_forest", "tundra"},
		y_min = 1,
		y_max = 31000,
		decoration = "crops:pumpkin_plant_4"
	})
end

-- drop potatoes when digging in dirt
minetest.override_item("default:dirt_with_grass", {
	drop = {
		items = {
			{ items = {'default:dirt'}},
			{ items = {'crops:potato'}, rarity = 500 }
		}
	}
})