]> git.lizzy.rs Git - Crafter.git/blob - mods/main/mapgen.lua
Stop player from dropping when they teleport through portals
[Crafter.git] / mods / main / mapgen.lua
1 minetest.register_alias("mapgen_stone", "main:stone")
2 minetest.register_alias("mapgen_dirt", "main:dirt")
3 minetest.register_alias("mapgen_dirt_with_grass", "main:grass")
4 minetest.register_alias("mapgen_water_source", "main:water")
5 minetest.register_alias("mapgen_sand", "main:sand")
6 minetest.register_alias("mapgen_tree", "main:tree")
7 minetest.register_alias("mapgen_leaves", "main:leaves")
8 minetest.register_alias("mapgen_apple", "main:leaves")
9
10
11 print("Initializing biomes")
12 --[[
13 minetest.register_biome({
14                 name = "greenhills",
15                 node_top = " main:grass",
16                 depth_top = 1,
17                 node_filler = "main:grass",
18                 depth_filler = 3,
19                 --node_riverbed = "default:sand",
20                 --depth_riverbed = 2,
21                 --node_dungeon = "default:cobble",
22                 --node_dungeon_alt = "default:mossycobble",
23                 --node_dungeon_stair = "stairs:stair_cobble",
24                 y_max = 31000,
25                 y_min = -31000,
26                 --heat_point = 50,
27                 --humidity_point = 35,
28         })
29 ]]--
30
31 minetest.register_biome({
32         name = "grassland",
33         node_top = "main:grass",
34         depth_top = 1,
35         node_filler = "main:dirt",
36         depth_filler = 3,
37         node_riverbed = "main:dirt",
38         depth_riverbed = 2,
39         --node_dungeon = "default:cobble",
40         --node_dungeon_alt = "default:mossycobble",
41         --node_dungeon_stair = "stairs:stair_cobble",
42         y_max = 256,
43         y_min = 6,
44         heat_point = 50,
45         humidity_point = 35,
46 })
47
48
49 minetest.register_biome({
50         name = "sandDunes",
51         node_top = "main:sand",
52         depth_top = 1,
53         node_filler = "main:sand",
54         depth_filler = 2,
55         node_riverbed = "main:sand",
56         depth_riverbed = 2,
57         --node_dungeon = "default:cobble",
58         --node_dungeon_alt = "default:mossycobble",
59         --node_dungeon_stair = "stairs:stair_cobble",
60         vertical_blend = 1,
61         y_max = 5,
62         y_min = 4,
63         heat_point = 50,
64         humidity_point = 35,
65 })
66
67 minetest.register_biome({
68         name = "beach",
69         node_top = "main:sand",
70         depth_top = 1,
71         node_filler = "main:sand",
72         depth_filler = 3,
73         node_riverbed = "main:sand",
74         depth_riverbed = 2,
75         node_cave_liquid = "main:water",
76         --node_dungeon = "main:cobble",
77         --node_dungeon_alt = "default:mossycobble",
78         --node_dungeon_stair = "stairs:stair_cobble",
79         y_max = 3,
80         y_min = -255,
81         heat_point = 50,
82         humidity_point = 35,
83 })
84
85 minetest.register_decoration({
86         name = "main:tree",
87         deco_type = "schematic",
88         place_on = {"main:grass"},
89         sidelen = 16,
90         noise_params = {
91                 offset = 0.024,
92                 scale = 0.015,
93                 spread = {x = 250, y = 250, z = 250},
94                 seed = 2,
95                 octaves = 3,
96                 persist = 0.66
97         },
98         biomes = {"grassland"},
99         y_max = 31000,
100         y_min = 0,
101         schematic = treeSchematic,
102         flags = "place_center_x, place_center_z",
103         rotation = "random",
104 })
105
106 minetest.register_decoration({
107         name = "main:sugarcane",
108         deco_type = "simple",
109         place_on = {"main:dirt","main:grass","main:sand"},
110         sidelen = 16,
111         noise_params = {
112                 offset = -0.3,
113                 scale = 0.7,
114                 spread = {x = 100, y = 100, z = 100},
115                 seed = 354,
116                 octaves = 3,
117                 persist = 0.7
118         },
119         y_max = 1,
120         y_min = 1,
121         decoration = "main:sugarcane",
122         height = 2,
123         height_max = 5,
124         spawn_by = "main:water",
125         num_spawn_by = 1,
126 })
127
128
129 minetest.register_decoration({
130                 name = "main:cactus",
131                 deco_type = "simple",
132                 place_on = {"main:sand"},
133                 sidelen = 16,
134                 noise_params = {
135                         offset = -0.012,
136                         scale = 0.024,
137                         spread = {x = 100, y = 100, z = 100},
138                         seed = 230,
139                         octaves = 3,
140                         persist = 0.6
141                 },
142                 y_max = 30,
143                 y_min = 0,
144                 decoration = "main:cactus",
145                 height = 3,
146                 height_max = 4,
147         })