82a97c652535c3c0e38b8e8392054357c269d951
[oweals/minetest_game.git] / mods / default / nodes.lua
1 -- mods/default/nodes.lua
2
3
4 --[[ Node name convention:
5
6 Although many node names are in combined-word form, the required form for new
7 node names is words separated by underscores. If both forms are used in written
8 language (for example pinewood and pine wood) the underscore form should be used.
9
10 --]]
11
12
13 --[[ Index:
14
15 Stone
16 -----
17 (1. Material 2. Cobble variant 3. Brick variant 4. Modified forms)
18
19 default:stone
20 default:cobble
21 default:stonebrick
22 default:stone_block
23 default:mossycobble
24
25 default:desert_stone
26 default:desert_cobble
27 default:desert_stonebrick
28 default:desert_stone_block
29
30 default:sandstone
31 default:sandstonebrick
32 default:sandstone_block
33
34 default:obsidian
35 default:obsidianbrick
36 default:obsidian_block
37
38 Soft / Non-Stone
39 ----------------
40 (1. Material 2. Modified forms)
41
42 default:dirt
43 default:dirt_with_grass
44 default:dirt_with_grass_footsteps
45 default:dirt_with_dry_grass
46 default:dirt_with_snow
47 default:dirt_with_rainforest_litter
48
49 default:sand
50 default:desert_sand
51 default:silver_sand
52
53 default:gravel
54
55 default:clay
56
57 default:snow
58 default:snowblock
59
60 default:ice
61
62 Trees
63 -----
64 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
65
66 default:tree
67 default:wood
68 default:leaves
69 default:sapling
70 default:apple
71
72 default:jungletree
73 default:junglewood
74 default:jungleleaves
75 default:junglesapling
76
77 default:pine_tree
78 default:pine_wood
79 default:pine_needles
80 default:pine_sapling
81
82 default:acacia_tree
83 default:acacia_wood
84 default:acacia_leaves
85 default:acacia_sapling
86
87 default:aspen_tree
88 default:aspen_wood
89 default:aspen_leaves
90 default:aspen_sapling
91
92 Ores
93 ----
94 (1. In stone 2. Blocks)
95
96 default:stone_with_coal
97 default:coalblock
98
99 default:stone_with_iron
100 default:steelblock
101
102 default:stone_with_copper
103 default:copperblock
104 default:bronzeblock
105
106 default:stone_with_gold
107 default:goldblock
108
109 default:stone_with_mese
110 default:mese
111
112 default:stone_with_diamond
113 default:diamondblock
114
115 Plantlife
116 ---------
117
118 default:cactus
119 default:papyrus
120 default:dry_shrub
121 default:junglegrass
122
123 default:grass_1
124 default:grass_2
125 default:grass_3
126 default:grass_4
127 default:grass_5
128
129 default:dry_grass_1
130 default:dry_grass_2
131 default:dry_grass_3
132 default:dry_grass_4
133 default:dry_grass_5
134
135 default:bush_stem
136 default:bush_leaves
137 default:acacia_bush_stem
138 default:acacia_bush_leaves
139
140 Corals
141 ------
142
143 default:coral_brown
144 default:coral_orange
145 default:coral_skeleton
146
147 Liquids
148 -------
149 (1. Source 2. Flowing)
150
151 default:water_source
152 default:water_flowing
153
154 default:river_water_source
155 default:river_water_flowing
156
157 default:lava_source
158 default:lava_flowing
159
160 Tools / "Advanced" crafting / Non-"natural"
161 -------------------------------------------
162
163 default:chest
164 default:chest_locked
165
166 default:bookshelf
167
168 default:sign_wall_wood
169 default:sign_wall_steel
170
171 default:ladder_wood
172 default:ladder_steel
173
174 default:fence_wood
175 default:fence_acacia_wood
176 default:fence_junglewood
177 default:fence_pine_wood
178 default:fence_aspen_wood
179
180 default:glass
181 default:obsidian_glass
182
183 default:brick
184
185 default:meselamp
186 default:mese_post_light
187
188 Misc
189 ----
190
191 default:cloud
192
193 --]]
194
195 --
196 -- Stone
197 --
198
199 minetest.register_node("default:stone", {
200         description = "Stone",
201         tiles = {"default_stone.png"},
202         groups = {cracky = 3, stone = 1},
203         drop = 'default:cobble',
204         legacy_mineral = true,
205         sounds = default.node_sound_stone_defaults(),
206 })
207
208 minetest.register_node("default:cobble", {
209         description = "Cobblestone",
210         tiles = {"default_cobble.png"},
211         is_ground_content = false,
212         groups = {cracky = 3, stone = 2},
213         sounds = default.node_sound_stone_defaults(),
214 })
215
216 minetest.register_node("default:stonebrick", {
217         description = "Stone Brick",
218         paramtype2 = "facedir",
219         place_param2 = 0,
220         tiles = {"default_stone_brick.png"},
221         is_ground_content = false,
222         groups = {cracky = 2, stone = 1},
223         sounds = default.node_sound_stone_defaults(),
224 })
225
226 minetest.register_node("default:stone_block", {
227         description = "Stone Block",
228         tiles = {"default_stone_block.png"},
229         is_ground_content = false,
230         groups = {cracky = 2, stone = 1},
231         sounds = default.node_sound_stone_defaults(),
232 })
233
234 minetest.register_node("default:mossycobble", {
235         description = "Mossy Cobblestone",
236         tiles = {"default_mossycobble.png"},
237         is_ground_content = false,
238         groups = {cracky = 3, stone = 1},
239         sounds = default.node_sound_stone_defaults(),
240 })
241
242
243 minetest.register_node("default:desert_stone", {
244         description = "Desert Stone",
245         tiles = {"default_desert_stone.png"},
246         groups = {cracky = 3, stone = 1},
247         drop = 'default:desert_cobble',
248         legacy_mineral = true,
249         sounds = default.node_sound_stone_defaults(),
250 })
251
252 minetest.register_node("default:desert_cobble", {
253         description = "Desert Cobblestone",
254         tiles = {"default_desert_cobble.png"},
255         is_ground_content = false,
256         groups = {cracky = 3, stone = 2},
257         sounds = default.node_sound_stone_defaults(),
258 })
259
260 minetest.register_node("default:desert_stonebrick", {
261         description = "Desert Stone Brick",
262         paramtype2 = "facedir",
263         place_param2 = 0,
264         tiles = {"default_desert_stone_brick.png"},
265         is_ground_content = false,
266         groups = {cracky = 2, stone = 1},
267         sounds = default.node_sound_stone_defaults(),
268 })
269
270 minetest.register_node("default:desert_stone_block", {
271         description = "Desert Stone Block",
272         tiles = {"default_desert_stone_block.png"},
273         is_ground_content = false,
274         groups = {cracky = 2, stone = 1},
275         sounds = default.node_sound_stone_defaults(),
276 })
277
278
279 minetest.register_node("default:sandstone", {
280         description = "Sandstone",
281         tiles = {"default_sandstone.png"},
282         groups = {crumbly = 1, cracky = 3},
283         sounds = default.node_sound_stone_defaults(),
284 })
285
286 minetest.register_node("default:sandstonebrick", {
287         description = "Sandstone Brick",
288         paramtype2 = "facedir",
289         place_param2 = 0,
290         tiles = {"default_sandstone_brick.png"},
291         is_ground_content = false,
292         groups = {cracky = 2},
293         sounds = default.node_sound_stone_defaults(),
294 })
295
296 minetest.register_node("default:sandstone_block", {
297         description = "Sandstone Block",
298         tiles = {"default_sandstone_block.png"},
299         is_ground_content = false,
300         groups = {cracky = 2},
301         sounds = default.node_sound_stone_defaults(),
302 })
303
304
305 minetest.register_node("default:obsidian", {
306         description = "Obsidian",
307         tiles = {"default_obsidian.png"},
308         sounds = default.node_sound_stone_defaults(),
309         groups = {cracky = 1, level = 2},
310 })
311
312 minetest.register_node("default:obsidianbrick", {
313         description = "Obsidian Brick",
314         paramtype2 = "facedir",
315         place_param2 = 0,
316         tiles = {"default_obsidian_brick.png"},
317         is_ground_content = false,
318         sounds = default.node_sound_stone_defaults(),
319         groups = {cracky = 1, level = 2},
320 })
321
322 minetest.register_node("default:obsidian_block", {
323         description = "Obsidian Block",
324         tiles = {"default_obsidian_block.png"},
325         is_ground_content = false,
326         sounds = default.node_sound_stone_defaults(),
327         groups = {cracky = 1, level = 2},
328 })
329
330 --
331 -- Soft / Non-Stone
332 --
333
334 minetest.register_node("default:dirt", {
335         description = "Dirt",
336         tiles = {"default_dirt.png"},
337         groups = {crumbly = 3, soil = 1},
338         sounds = default.node_sound_dirt_defaults(),
339 })
340
341 minetest.register_node("default:dirt_with_grass", {
342         description = "Dirt with Grass",
343         tiles = {"default_grass.png", "default_dirt.png",
344                 {name = "default_dirt.png^default_grass_side.png",
345                         tileable_vertical = false}},
346         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
347         drop = 'default:dirt',
348         sounds = default.node_sound_dirt_defaults({
349                 footstep = {name = "default_grass_footstep", gain = 0.25},
350         }),
351 })
352
353 minetest.register_node("default:dirt_with_grass_footsteps", {
354         description = "Dirt with Grass and Footsteps",
355         tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
356                 {name = "default_dirt.png^default_grass_side.png",
357                         tileable_vertical = false}},
358         groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
359         drop = 'default:dirt',
360         sounds = default.node_sound_dirt_defaults({
361                 footstep = {name = "default_grass_footstep", gain = 0.25},
362         }),
363 })
364
365 minetest.register_node("default:dirt_with_dry_grass", {
366         description = "Dirt with Dry Grass",
367         tiles = {"default_dry_grass.png",
368                 "default_dirt.png",
369                 {name = "default_dirt.png^default_dry_grass_side.png",
370                         tileable_vertical = false}},
371         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
372         drop = 'default:dirt',
373         sounds = default.node_sound_dirt_defaults({
374                 footstep = {name = "default_grass_footstep", gain = 0.4},
375         }),
376 })
377
378 minetest.register_node("default:dirt_with_snow", {
379         description = "Dirt with Snow",
380         tiles = {"default_snow.png", "default_dirt.png",
381                 {name = "default_dirt.png^default_snow_side.png",
382                         tileable_vertical = false}},
383         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
384         drop = 'default:dirt',
385         sounds = default.node_sound_dirt_defaults({
386                 footstep = {name = "default_snow_footstep", gain = 0.15},
387         }),
388 })
389
390 minetest.register_node("default:dirt_with_rainforest_litter", {
391         description = "Dirt with Rainforest Litter",
392         tiles = {
393                 "default_rainforest_litter.png",
394                 "default_dirt.png",
395                 {name = "default_dirt.png^default_rainforest_litter_side.png",
396                         tileable_vertical = false}
397         },
398         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
399         drop = "default:dirt",
400         sounds = default.node_sound_dirt_defaults({
401                 footstep = {name = "default_grass_footstep", gain = 0.4},
402         }),
403 })
404
405 minetest.register_node("default:sand", {
406         description = "Sand",
407         tiles = {"default_sand.png"},
408         groups = {crumbly = 3, falling_node = 1, sand = 1},
409         sounds = default.node_sound_sand_defaults(),
410 })
411
412 minetest.register_node("default:desert_sand", {
413         description = "Desert Sand",
414         tiles = {"default_desert_sand.png"},
415         groups = {crumbly = 3, falling_node = 1, sand = 1},
416         sounds = default.node_sound_sand_defaults(),
417 })
418
419 minetest.register_node("default:silver_sand", {
420         description = "Silver Sand",
421         tiles = {"default_silver_sand.png"},
422         groups = {crumbly = 3, falling_node = 1, sand = 1},
423         sounds = default.node_sound_sand_defaults(),
424 })
425
426
427 minetest.register_node("default:gravel", {
428         description = "Gravel",
429         tiles = {"default_gravel.png"},
430         groups = {crumbly = 2, falling_node = 1},
431         sounds = default.node_sound_gravel_defaults(),
432         drop = {
433                 max_items = 1,
434                 items = {
435                         {items = {'default:flint'}, rarity = 16},
436                         {items = {'default:gravel'}}
437                 }
438         }
439 })
440
441 minetest.register_node("default:clay", {
442         description = "Clay",
443         tiles = {"default_clay.png"},
444         groups = {crumbly = 3},
445         drop = 'default:clay_lump 4',
446         sounds = default.node_sound_dirt_defaults(),
447 })
448
449
450 minetest.register_node("default:snow", {
451         description = "Snow",
452         tiles = {"default_snow.png"},
453         inventory_image = "default_snowball.png",
454         wield_image = "default_snowball.png",
455         paramtype = "light",
456         buildable_to = true,
457         floodable = true,
458         drawtype = "nodebox",
459         node_box = {
460                 type = "fixed",
461                 fixed = {
462                         {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
463                 },
464         },
465         groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1, snowy = 1},
466         sounds = default.node_sound_dirt_defaults({
467                 footstep = {name = "default_snow_footstep", gain = 0.15},
468                 dug = {name = "default_snow_footstep", gain = 0.2},
469                 dig = {name = "default_snow_footstep", gain = 0.2}
470         }),
471
472         on_construct = function(pos)
473                 pos.y = pos.y - 1
474                 if minetest.get_node(pos).name == "default:dirt_with_grass" then
475                         minetest.set_node(pos, {name = "default:dirt_with_snow"})
476                 end
477         end,
478 })
479
480 minetest.register_node("default:snowblock", {
481         description = "Snow Block",
482         tiles = {"default_snow.png"},
483         groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1},
484         sounds = default.node_sound_dirt_defaults({
485                 footstep = {name = "default_snow_footstep", gain = 0.15},
486                 dug = {name = "default_snow_footstep", gain = 0.2},
487                 dig = {name = "default_snow_footstep", gain = 0.2}
488         }),
489
490         on_construct = function(pos)
491                 pos.y = pos.y - 1
492                 if minetest.get_node(pos).name == "default:dirt_with_grass" then
493                         minetest.set_node(pos, {name = "default:dirt_with_snow"})
494                 end
495         end,
496 })
497
498 minetest.register_node("default:ice", {
499         description = "Ice",
500         tiles = {"default_ice.png"},
501         is_ground_content = false,
502         paramtype = "light",
503         groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
504         sounds = default.node_sound_glass_defaults(),
505 })
506
507 --
508 -- Trees
509 --
510
511 minetest.register_node("default:tree", {
512         description = "Tree",
513         tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
514         paramtype2 = "facedir",
515         is_ground_content = false,
516         groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
517         sounds = default.node_sound_wood_defaults(),
518
519         on_place = minetest.rotate_node
520 })
521
522 minetest.register_node("default:wood", {
523         description = "Wooden Planks",
524         paramtype2 = "facedir",
525         place_param2 = 0,
526         tiles = {"default_wood.png"},
527         is_ground_content = false,
528         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
529         sounds = default.node_sound_wood_defaults(),
530 })
531
532 minetest.register_node("default:sapling", {
533         description = "Sapling",
534         drawtype = "plantlike",
535         tiles = {"default_sapling.png"},
536         inventory_image = "default_sapling.png",
537         wield_image = "default_sapling.png",
538         paramtype = "light",
539         sunlight_propagates = true,
540         walkable = false,
541         on_timer = default.grow_sapling,
542         selection_box = {
543                 type = "fixed",
544                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
545         },
546         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
547                 attached_node = 1, sapling = 1},
548         sounds = default.node_sound_leaves_defaults(),
549
550         on_construct = function(pos)
551                 minetest.get_node_timer(pos):start(math.random(2400,4800))
552         end,
553
554         on_place = function(itemstack, placer, pointed_thing)
555                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
556                         "default:sapling",
557                         -- minp, maxp to be checked, relative to sapling pos
558                         -- minp_relative.y = 1 because sapling pos has been checked
559                         {x = -2, y = 1, z = -2},
560                         {x = 2, y = 6, z = 2},
561                         -- maximum interval of interior volume check
562                         4)
563
564                 return itemstack
565         end,
566 })
567
568 minetest.register_node("default:leaves", {
569         description = "Leaves",
570         drawtype = "allfaces_optional",
571         waving = 1,
572         tiles = {"default_leaves.png"},
573         special_tiles = {"default_leaves_simple.png"},
574         paramtype = "light",
575         is_ground_content = false,
576         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
577         drop = {
578                 max_items = 1,
579                 items = {
580                         {
581                                 -- player will get sapling with 1/20 chance
582                                 items = {'default:sapling'},
583                                 rarity = 20,
584                         },
585                         {
586                                 -- player will get leaves only if he get no saplings,
587                                 -- this is because max_items is 1
588                                 items = {'default:leaves'},
589                         }
590                 }
591         },
592         sounds = default.node_sound_leaves_defaults(),
593
594         after_place_node = default.after_place_leaves,
595 })
596
597 minetest.register_node("default:apple", {
598         description = "Apple",
599         drawtype = "plantlike",
600         tiles = {"default_apple.png"},
601         inventory_image = "default_apple.png",
602         paramtype = "light",
603         sunlight_propagates = true,
604         walkable = false,
605         is_ground_content = false,
606         selection_box = {
607                 type = "fixed",
608                 fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
609         },
610         groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
611                 leafdecay = 3, leafdecay_drop = 1},
612         on_use = minetest.item_eat(2),
613         sounds = default.node_sound_leaves_defaults(),
614
615         after_place_node = function(pos, placer, itemstack)
616                 if placer:is_player() then
617                         minetest.set_node(pos, {name = "default:apple", param2 = 1})
618                 end
619         end,
620 })
621
622
623 minetest.register_node("default:jungletree", {
624         description = "Jungle Tree",
625         tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
626                 "default_jungletree.png"},
627         paramtype2 = "facedir",
628         is_ground_content = false,
629         groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
630         sounds = default.node_sound_wood_defaults(),
631
632         on_place = minetest.rotate_node
633 })
634
635 minetest.register_node("default:junglewood", {
636         description = "Junglewood Planks",
637         paramtype2 = "facedir",
638         place_param2 = 0,
639         tiles = {"default_junglewood.png"},
640         is_ground_content = false,
641         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
642         sounds = default.node_sound_wood_defaults(),
643 })
644
645 minetest.register_node("default:jungleleaves", {
646         description = "Jungle Leaves",
647         drawtype = "allfaces_optional",
648         waving = 1,
649         tiles = {"default_jungleleaves.png"},
650         special_tiles = {"default_jungleleaves_simple.png"},
651         paramtype = "light",
652         is_ground_content = false,
653         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
654         drop = {
655                 max_items = 1,
656                 items = {
657                         {items = {'default:junglesapling'}, rarity = 20},
658                         {items = {'default:jungleleaves'}}
659                 }
660         },
661         sounds = default.node_sound_leaves_defaults(),
662
663         after_place_node = default.after_place_leaves,
664 })
665
666 minetest.register_node("default:junglesapling", {
667         description = "Jungle Sapling",
668         drawtype = "plantlike",
669         tiles = {"default_junglesapling.png"},
670         inventory_image = "default_junglesapling.png",
671         wield_image = "default_junglesapling.png",
672         paramtype = "light",
673         sunlight_propagates = true,
674         walkable = false,
675         on_timer = default.grow_sapling,
676         selection_box = {
677                 type = "fixed",
678                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
679         },
680         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
681                 attached_node = 1, sapling = 1},
682         sounds = default.node_sound_leaves_defaults(),
683
684         on_construct = function(pos)
685                 minetest.get_node_timer(pos):start(math.random(2400,4800))
686         end,
687
688         on_place = function(itemstack, placer, pointed_thing)
689                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
690                         "default:junglesapling",
691                         -- minp, maxp to be checked, relative to sapling pos
692                         -- minp_relative.y = 1 because sapling pos has been checked
693                         {x = -2, y = 1, z = -2},
694                         {x = 2, y = 15, z = 2},
695                         -- maximum interval of interior volume check
696                         4)
697
698                 return itemstack
699         end,
700 })
701
702
703 minetest.register_node("default:pine_tree", {
704         description = "Pine Tree",
705         tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
706                 "default_pine_tree.png"},
707         paramtype2 = "facedir",
708         is_ground_content = false,
709         groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
710         sounds = default.node_sound_wood_defaults(),
711
712         on_place = minetest.rotate_node
713 })
714
715 minetest.register_node("default:pine_wood", {
716         description = "Pine Wood Planks",
717         paramtype2 = "facedir",
718         place_param2 = 0,
719         tiles = {"default_pine_wood.png"},
720         is_ground_content = false,
721         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
722         sounds = default.node_sound_wood_defaults(),
723 })
724
725 minetest.register_node("default:pine_needles",{
726         description = "Pine Needles",
727         drawtype = "allfaces_optional",
728         tiles = {"default_pine_needles.png"},
729         waving = 1,
730         paramtype = "light",
731         is_ground_content = false,
732         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
733         drop = {
734                 max_items = 1,
735                 items = {
736                         {items = {"default:pine_sapling"}, rarity = 20},
737                         {items = {"default:pine_needles"}}
738                 }
739         },
740         sounds = default.node_sound_leaves_defaults(),
741
742         after_place_node = default.after_place_leaves,
743 })
744
745 minetest.register_node("default:pine_sapling", {
746         description = "Pine Sapling",
747         drawtype = "plantlike",
748         tiles = {"default_pine_sapling.png"},
749         inventory_image = "default_pine_sapling.png",
750         wield_image = "default_pine_sapling.png",
751         paramtype = "light",
752         sunlight_propagates = true,
753         walkable = false,
754         on_timer = default.grow_sapling,
755         selection_box = {
756                 type = "fixed",
757                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
758         },
759         groups = {snappy = 2, dig_immediate = 3, flammable = 3,
760                 attached_node = 1, sapling = 1},
761         sounds = default.node_sound_leaves_defaults(),
762
763         on_construct = function(pos)
764                 minetest.get_node_timer(pos):start(math.random(2400,4800))
765         end,
766
767         on_place = function(itemstack, placer, pointed_thing)
768                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
769                         "default:pine_sapling",
770                         -- minp, maxp to be checked, relative to sapling pos
771                         -- minp_relative.y = 1 because sapling pos has been checked
772                         {x = -2, y = 1, z = -2},
773                         {x = 2, y = 12, z = 2},
774                         -- maximum interval of interior volume check
775                         4)
776
777                 return itemstack
778         end,
779 })
780
781
782 minetest.register_node("default:acacia_tree", {
783         description = "Acacia Tree",
784         tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
785                 "default_acacia_tree.png"},
786         paramtype2 = "facedir",
787         is_ground_content = false,
788         groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
789         sounds = default.node_sound_wood_defaults(),
790
791         on_place = minetest.rotate_node
792 })
793
794 minetest.register_node("default:acacia_wood", {
795         description = "Acacia Wood Planks",
796         paramtype2 = "facedir",
797         place_param2 = 0,
798         tiles = {"default_acacia_wood.png"},
799         is_ground_content = false,
800         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
801         sounds = default.node_sound_wood_defaults(),
802 })
803
804 minetest.register_node("default:acacia_leaves", {
805         description = "Acacia Leaves",
806         drawtype = "allfaces_optional",
807         tiles = {"default_acacia_leaves.png"},
808         special_tiles = {"default_acacia_leaves_simple.png"},
809         waving = 1,
810         paramtype = "light",
811         is_ground_content = false,
812         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
813         drop = {
814                 max_items = 1,
815                 items = {
816                         {items = {"default:acacia_sapling"}, rarity = 20},
817                         {items = {"default:acacia_leaves"}}
818                 }
819         },
820         sounds = default.node_sound_leaves_defaults(),
821
822         after_place_node = default.after_place_leaves,
823 })
824
825 minetest.register_node("default:acacia_sapling", {
826         description = "Acacia Tree Sapling",
827         drawtype = "plantlike",
828         tiles = {"default_acacia_sapling.png"},
829         inventory_image = "default_acacia_sapling.png",
830         wield_image = "default_acacia_sapling.png",
831         paramtype = "light",
832         sunlight_propagates = true,
833         walkable = false,
834         on_timer = default.grow_sapling,
835         selection_box = {
836                 type = "fixed",
837                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
838         },
839         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
840                 attached_node = 1, sapling = 1},
841         sounds = default.node_sound_leaves_defaults(),
842
843         on_construct = function(pos)
844                 minetest.get_node_timer(pos):start(math.random(2400,4800))
845         end,
846
847         on_place = function(itemstack, placer, pointed_thing)
848                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
849                         "default:acacia_sapling",
850                         -- minp, maxp to be checked, relative to sapling pos
851                         -- minp_relative.y = 1 because sapling pos has been checked
852                         {x = -4, y = 1, z = -4},
853                         {x = 4, y = 6, z = 4},
854                         -- maximum interval of interior volume check
855                         4)
856
857                 return itemstack
858         end,
859 })
860
861 minetest.register_node("default:aspen_tree", {
862         description = "Aspen Tree",
863         tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png",
864                 "default_aspen_tree.png"},
865         paramtype2 = "facedir",
866         is_ground_content = false,
867         groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
868         sounds = default.node_sound_wood_defaults(),
869
870         on_place = minetest.rotate_node
871 })
872
873 minetest.register_node("default:aspen_wood", {
874         description = "Aspen Wood Planks",
875         paramtype2 = "facedir",
876         place_param2 = 0,
877         tiles = {"default_aspen_wood.png"},
878         is_ground_content = false,
879         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
880         sounds = default.node_sound_wood_defaults(),
881 })
882
883 minetest.register_node("default:aspen_leaves", {
884         description = "Aspen Leaves",
885         drawtype = "allfaces_optional",
886         tiles = {"default_aspen_leaves.png"},
887         waving = 1,
888         paramtype = "light",
889         is_ground_content = false,
890         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
891         drop = {
892                 max_items = 1,
893                 items = {
894                         {items = {"default:aspen_sapling"}, rarity = 20},
895                         {items = {"default:aspen_leaves"}}
896                 }
897         },
898         sounds = default.node_sound_leaves_defaults(),
899
900         after_place_node = default.after_place_leaves,
901 })
902
903 minetest.register_node("default:aspen_sapling", {
904         description = "Aspen Tree Sapling",
905         drawtype = "plantlike",
906         tiles = {"default_aspen_sapling.png"},
907         inventory_image = "default_aspen_sapling.png",
908         wield_image = "default_aspen_sapling.png",
909         paramtype = "light",
910         sunlight_propagates = true,
911         walkable = false,
912         on_timer = default.grow_sapling,
913         selection_box = {
914                 type = "fixed",
915                 fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16}
916         },
917         groups = {snappy = 2, dig_immediate = 3, flammable = 3,
918                 attached_node = 1, sapling = 1},
919         sounds = default.node_sound_leaves_defaults(),
920
921         on_construct = function(pos)
922                 minetest.get_node_timer(pos):start(math.random(2400,4800))
923         end,
924
925         on_place = function(itemstack, placer, pointed_thing)
926                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
927                         "default:aspen_sapling",
928                         -- minp, maxp to be checked, relative to sapling pos
929                         -- minp_relative.y = 1 because sapling pos has been checked
930                         {x = -2, y = 1, z = -2},
931                         {x = 2, y = 12, z = 2},
932                         -- maximum interval of interior volume check
933                         4)
934
935                 return itemstack
936         end,
937 })
938
939 --
940 -- Ores
941 --
942
943 minetest.register_node("default:stone_with_coal", {
944         description = "Coal Ore",
945         tiles = {"default_stone.png^default_mineral_coal.png"},
946         groups = {cracky = 3},
947         drop = 'default:coal_lump',
948         sounds = default.node_sound_stone_defaults(),
949 })
950
951 minetest.register_node("default:coalblock", {
952         description = "Coal Block",
953         tiles = {"default_coal_block.png"},
954         is_ground_content = false,
955         groups = {cracky = 3},
956         sounds = default.node_sound_stone_defaults(),
957 })
958
959
960 minetest.register_node("default:stone_with_iron", {
961         description = "Iron Ore",
962         tiles = {"default_stone.png^default_mineral_iron.png"},
963         groups = {cracky = 2},
964         drop = 'default:iron_lump',
965         sounds = default.node_sound_stone_defaults(),
966 })
967
968 minetest.register_node("default:steelblock", {
969         description = "Steel Block",
970         tiles = {"default_steel_block.png"},
971         is_ground_content = false,
972         groups = {cracky = 1, level = 2},
973         sounds = default.node_sound_metal_defaults(),
974 })
975
976
977 minetest.register_node("default:stone_with_copper", {
978         description = "Copper Ore",
979         tiles = {"default_stone.png^default_mineral_copper.png"},
980         groups = {cracky = 2},
981         drop = 'default:copper_lump',
982         sounds = default.node_sound_stone_defaults(),
983 })
984
985 minetest.register_node("default:copperblock", {
986         description = "Copper Block",
987         tiles = {"default_copper_block.png"},
988         is_ground_content = false,
989         groups = {cracky = 1, level = 2},
990         sounds = default.node_sound_metal_defaults(),
991 })
992
993 minetest.register_node("default:bronzeblock", {
994         description = "Bronze Block",
995         tiles = {"default_bronze_block.png"},
996         is_ground_content = false,
997         groups = {cracky = 1, level = 2},
998         sounds = default.node_sound_metal_defaults(),
999 })
1000
1001
1002 minetest.register_node("default:stone_with_mese", {
1003         description = "Mese Ore",
1004         tiles = {"default_stone.png^default_mineral_mese.png"},
1005         groups = {cracky = 1},
1006         drop = "default:mese_crystal",
1007         sounds = default.node_sound_stone_defaults(),
1008 })
1009
1010 minetest.register_node("default:mese", {
1011         description = "Mese Block",
1012         tiles = {"default_mese_block.png"},
1013         paramtype = "light",
1014         groups = {cracky = 1, level = 2},
1015         sounds = default.node_sound_stone_defaults(),
1016         light_source = 3,
1017 })
1018
1019
1020 minetest.register_node("default:stone_with_gold", {
1021         description = "Gold Ore",
1022         tiles = {"default_stone.png^default_mineral_gold.png"},
1023         groups = {cracky = 2},
1024         drop = "default:gold_lump",
1025         sounds = default.node_sound_stone_defaults(),
1026 })
1027
1028 minetest.register_node("default:goldblock", {
1029         description = "Gold Block",
1030         tiles = {"default_gold_block.png"},
1031         is_ground_content = false,
1032         groups = {cracky = 1},
1033         sounds = default.node_sound_metal_defaults(),
1034 })
1035
1036
1037 minetest.register_node("default:stone_with_diamond", {
1038         description = "Diamond Ore",
1039         tiles = {"default_stone.png^default_mineral_diamond.png"},
1040         groups = {cracky = 1},
1041         drop = "default:diamond",
1042         sounds = default.node_sound_stone_defaults(),
1043 })
1044
1045 minetest.register_node("default:diamondblock", {
1046         description = "Diamond Block",
1047         tiles = {"default_diamond_block.png"},
1048         is_ground_content = false,
1049         groups = {cracky = 1, level = 3},
1050         sounds = default.node_sound_stone_defaults(),
1051 })
1052
1053 --
1054 -- Plantlife (non-cubic)
1055 --
1056
1057 minetest.register_node("default:cactus", {
1058         description = "Cactus",
1059         tiles = {"default_cactus_top.png", "default_cactus_top.png",
1060                 "default_cactus_side.png"},
1061         paramtype2 = "facedir",
1062         groups = {choppy = 3},
1063         sounds = default.node_sound_wood_defaults(),
1064         on_place = minetest.rotate_node,
1065 })
1066
1067 minetest.register_node("default:papyrus", {
1068         description = "Papyrus",
1069         drawtype = "plantlike",
1070         tiles = {"default_papyrus.png"},
1071         inventory_image = "default_papyrus.png",
1072         wield_image = "default_papyrus.png",
1073         paramtype = "light",
1074         sunlight_propagates = true,
1075         walkable = false,
1076         selection_box = {
1077                 type = "fixed",
1078                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
1079         },
1080         groups = {snappy = 3, flammable = 2},
1081         sounds = default.node_sound_leaves_defaults(),
1082
1083         after_dig_node = function(pos, node, metadata, digger)
1084                 default.dig_up(pos, node, digger)
1085         end,
1086 })
1087
1088 minetest.register_node("default:dry_shrub", {
1089         description = "Dry Shrub",
1090         drawtype = "plantlike",
1091         waving = 1,
1092         tiles = {"default_dry_shrub.png"},
1093         inventory_image = "default_dry_shrub.png",
1094         wield_image = "default_dry_shrub.png",
1095         paramtype = "light",
1096         sunlight_propagates = true,
1097         walkable = false,
1098         buildable_to = true,
1099         groups = {snappy = 3, flammable = 3, attached_node = 1},
1100         sounds = default.node_sound_leaves_defaults(),
1101         selection_box = {
1102                 type = "fixed",
1103                 fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 4 / 16, 5 / 16},
1104         },
1105 })
1106
1107 minetest.register_node("default:junglegrass", {
1108         description = "Jungle Grass",
1109         drawtype = "plantlike",
1110         waving = 1,
1111         visual_scale = 1.69,
1112         tiles = {"default_junglegrass.png"},
1113         inventory_image = "default_junglegrass.png",
1114         wield_image = "default_junglegrass.png",
1115         paramtype = "light",
1116         sunlight_propagates = true,
1117         walkable = false,
1118         buildable_to = true,
1119         groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
1120         sounds = default.node_sound_leaves_defaults(),
1121         selection_box = {
1122                 type = "fixed",
1123                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 1.19, 7 / 16},
1124         },
1125 })
1126
1127
1128 minetest.register_node("default:grass_1", {
1129         description = "Grass",
1130         drawtype = "plantlike",
1131         waving = 1,
1132         tiles = {"default_grass_1.png"},
1133         -- Use texture of a taller grass stage in inventory
1134         inventory_image = "default_grass_3.png",
1135         wield_image = "default_grass_3.png",
1136         paramtype = "light",
1137         sunlight_propagates = true,
1138         walkable = false,
1139         buildable_to = true,
1140         groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
1141         sounds = default.node_sound_leaves_defaults(),
1142         selection_box = {
1143                 type = "fixed",
1144                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
1145         },
1146
1147         on_place = function(itemstack, placer, pointed_thing)
1148                 -- place a random grass node
1149                 local stack = ItemStack("default:grass_" .. math.random(1,5))
1150                 local ret = minetest.item_place(stack, placer, pointed_thing)
1151                 return ItemStack("default:grass_1 " ..
1152                         itemstack:get_count() - (1 - ret:get_count()))
1153         end,
1154 })
1155
1156 for i = 2, 5 do
1157         minetest.register_node("default:grass_" .. i, {
1158                 description = "Grass",
1159                 drawtype = "plantlike",
1160                 waving = 1,
1161                 tiles = {"default_grass_" .. i .. ".png"},
1162                 inventory_image = "default_grass_" .. i .. ".png",
1163                 wield_image = "default_grass_" .. i .. ".png",
1164                 paramtype = "light",
1165                 sunlight_propagates = true,
1166                 walkable = false,
1167                 buildable_to = true,
1168                 drop = "default:grass_1",
1169                 groups = {snappy = 3, flora = 1, attached_node = 1,
1170                         not_in_creative_inventory = 1, grass = 1, flammable = 1},
1171                 sounds = default.node_sound_leaves_defaults(),
1172                 selection_box = {
1173                         type = "fixed",
1174                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1175                 },
1176         })
1177 end
1178
1179
1180 minetest.register_node("default:dry_grass_1", {
1181         description = "Dry Grass",
1182         drawtype = "plantlike",
1183         waving = 1,
1184         tiles = {"default_dry_grass_1.png"},
1185         inventory_image = "default_dry_grass_3.png",
1186         wield_image = "default_dry_grass_3.png",
1187         paramtype = "light",
1188         sunlight_propagates = true,
1189         walkable = false,
1190         buildable_to = true,
1191         groups = {snappy = 3, flammable = 3, flora = 1,
1192                 attached_node = 1, dry_grass = 1},
1193         sounds = default.node_sound_leaves_defaults(),
1194         selection_box = {
1195                 type = "fixed",
1196                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1197         },
1198
1199         on_place = function(itemstack, placer, pointed_thing)
1200                 -- place a random dry grass node
1201                 local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
1202                 local ret = minetest.item_place(stack, placer, pointed_thing)
1203                 return ItemStack("default:dry_grass_1 " ..
1204                         itemstack:get_count() - (1 - ret:get_count()))
1205         end,
1206 })
1207
1208 for i = 2, 5 do
1209         minetest.register_node("default:dry_grass_" .. i, {
1210                 description = "Dry Grass",
1211                 drawtype = "plantlike",
1212                 waving = 1,
1213                 tiles = {"default_dry_grass_" .. i .. ".png"},
1214                 inventory_image = "default_dry_grass_" .. i .. ".png",
1215                 wield_image = "default_dry_grass_" .. i .. ".png",
1216                 paramtype = "light",
1217                 sunlight_propagates = true,
1218                 walkable = false,
1219                 buildable_to = true,
1220                 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1221                         not_in_creative_inventory=1, dry_grass = 1},
1222                 drop = "default:dry_grass_1",
1223                 sounds = default.node_sound_leaves_defaults(),
1224                 selection_box = {
1225                         type = "fixed",
1226                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16},
1227                 },
1228         })
1229 end
1230
1231
1232 minetest.register_node("default:bush_stem", {
1233         description = "Bush Stem",
1234         drawtype = "plantlike",
1235         visual_scale = 1.41,
1236         tiles = {"default_bush_stem.png"},
1237         inventory_image = "default_bush_stem.png",
1238         wield_image = "default_bush_stem.png",
1239         paramtype = "light",
1240         sunlight_propagates = true,
1241         groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1242         sounds = default.node_sound_wood_defaults(),
1243         selection_box = {
1244                 type = "fixed",
1245                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.54, 7 / 16},
1246         },
1247 })
1248
1249 minetest.register_node("default:bush_leaves", {
1250         description = "Bush Leaves",
1251         drawtype = "allfaces_optional",
1252         waving = 1,
1253         tiles = {"default_leaves_simple.png"},
1254         paramtype = "light",
1255         groups = {snappy = 3, flammable = 2, leaves = 1},
1256         sounds = default.node_sound_leaves_defaults(),
1257 })
1258
1259 minetest.register_node("default:acacia_bush_stem", {
1260         description = "Acacia Bush Stem",
1261         drawtype = "plantlike",
1262         visual_scale = 1.41,
1263         tiles = {"default_acacia_bush_stem.png"},
1264         inventory_image = "default_acacia_bush_stem.png",
1265         wield_image = "default_acacia_bush_stem.png",
1266         paramtype = "light",
1267         sunlight_propagates = true,
1268         groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1269         sounds = default.node_sound_wood_defaults(),
1270         selection_box = {
1271                 type = "fixed",
1272                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.54, 7 / 16},
1273         },
1274 })
1275
1276 minetest.register_node("default:acacia_bush_leaves", {
1277         description = "Acacia Bush Leaves",
1278         drawtype = "allfaces_optional",
1279         waving = 1,
1280         tiles = {"default_acacia_leaves_simple.png"},
1281         paramtype = "light",
1282         groups = {snappy = 3, flammable = 2, leaves = 1},
1283         sounds = default.node_sound_leaves_defaults(),
1284 })
1285
1286
1287 --
1288 -- Corals
1289 --
1290
1291 minetest.register_node("default:coral_brown", {
1292         description = "Brown Coral",
1293         tiles = {"default_coral_brown.png"},
1294         groups = {cracky = 3},
1295         drop = "default:coral_skeleton",
1296         sounds = default.node_sound_stone_defaults(),
1297 })
1298
1299 minetest.register_node("default:coral_orange", {
1300         description = "Orange Coral",
1301         tiles = {"default_coral_orange.png"},
1302         groups = {cracky = 3},
1303         drop = "default:coral_skeleton",
1304         sounds = default.node_sound_stone_defaults(),
1305 })
1306
1307 minetest.register_node("default:coral_skeleton", {
1308         description = "Coral Skeleton",
1309         tiles = {"default_coral_skeleton.png"},
1310         groups = {cracky = 3},
1311         sounds = default.node_sound_stone_defaults(),
1312 })
1313
1314
1315 --
1316 -- Liquids
1317 --
1318
1319 minetest.register_node("default:water_source", {
1320         description = "Water Source",
1321         drawtype = "liquid",
1322         tiles = {
1323                 {
1324                         name = "default_water_source_animated.png",
1325                         animation = {
1326                                 type = "vertical_frames",
1327                                 aspect_w = 16,
1328                                 aspect_h = 16,
1329                                 length = 2.0,
1330                         },
1331                 },
1332         },
1333         special_tiles = {
1334                 -- New-style water source material (mostly unused)
1335                 {
1336                         name = "default_water_source_animated.png",
1337                         animation = {
1338                                 type = "vertical_frames",
1339                                 aspect_w = 16,
1340                                 aspect_h = 16,
1341                                 length = 2.0,
1342                         },
1343                         backface_culling = false,
1344                 },
1345         },
1346         alpha = 160,
1347         paramtype = "light",
1348         walkable = false,
1349         pointable = false,
1350         diggable = false,
1351         buildable_to = true,
1352         is_ground_content = false,
1353         drop = "",
1354         drowning = 1,
1355         liquidtype = "source",
1356         liquid_alternative_flowing = "default:water_flowing",
1357         liquid_alternative_source = "default:water_source",
1358         liquid_viscosity = 1,
1359         post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1360         groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
1361         sounds = default.node_sound_water_defaults(),
1362 })
1363
1364 minetest.register_node("default:water_flowing", {
1365         description = "Flowing Water",
1366         drawtype = "flowingliquid",
1367         tiles = {"default_water.png"},
1368         special_tiles = {
1369                 {
1370                         name = "default_water_flowing_animated.png",
1371                         backface_culling = false,
1372                         animation = {
1373                                 type = "vertical_frames",
1374                                 aspect_w = 16,
1375                                 aspect_h = 16,
1376                                 length = 0.8,
1377                         },
1378                 },
1379                 {
1380                         name = "default_water_flowing_animated.png",
1381                         backface_culling = true,
1382                         animation = {
1383                                 type = "vertical_frames",
1384                                 aspect_w = 16,
1385                                 aspect_h = 16,
1386                                 length = 0.8,
1387                         },
1388                 },
1389         },
1390         alpha = 160,
1391         paramtype = "light",
1392         paramtype2 = "flowingliquid",
1393         walkable = false,
1394         pointable = false,
1395         diggable = false,
1396         buildable_to = true,
1397         is_ground_content = false,
1398         drop = "",
1399         drowning = 1,
1400         liquidtype = "flowing",
1401         liquid_alternative_flowing = "default:water_flowing",
1402         liquid_alternative_source = "default:water_source",
1403         liquid_viscosity = 1,
1404         post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1405         groups = {water = 3, liquid = 3, puts_out_fire = 1,
1406                 not_in_creative_inventory = 1, cools_lava = 1},
1407         sounds = default.node_sound_water_defaults(),
1408 })
1409
1410
1411 minetest.register_node("default:river_water_source", {
1412         description = "River Water Source",
1413         drawtype = "liquid",
1414         tiles = {
1415                 {
1416                         name = "default_river_water_source_animated.png",
1417                         animation = {
1418                                 type = "vertical_frames",
1419                                 aspect_w = 16,
1420                                 aspect_h = 16,
1421                                 length = 2.0,
1422                         },
1423                 },
1424         },
1425         special_tiles = {
1426                 {
1427                         name = "default_river_water_source_animated.png",
1428                         animation = {
1429                                 type = "vertical_frames",
1430                                 aspect_w = 16,
1431                                 aspect_h = 16,
1432                                 length = 2.0,
1433                         },
1434                         backface_culling = false,
1435                 },
1436         },
1437         alpha = 160,
1438         paramtype = "light",
1439         walkable = false,
1440         pointable = false,
1441         diggable = false,
1442         buildable_to = true,
1443         is_ground_content = false,
1444         drop = "",
1445         drowning = 1,
1446         liquidtype = "source",
1447         liquid_alternative_flowing = "default:river_water_flowing",
1448         liquid_alternative_source = "default:river_water_source",
1449         liquid_viscosity = 1,
1450         liquid_renewable = false,
1451         liquid_range = 2,
1452         post_effect_color = {a = 103, r = 30, g = 76, b = 90},
1453         groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
1454         sounds = default.node_sound_water_defaults(),
1455 })
1456
1457 minetest.register_node("default:river_water_flowing", {
1458         description = "Flowing River Water",
1459         drawtype = "flowingliquid",
1460         tiles = {"default_river_water.png"},
1461         special_tiles = {
1462                 {
1463                         name = "default_river_water_flowing_animated.png",
1464                         backface_culling = false,
1465                         animation = {
1466                                 type = "vertical_frames",
1467                                 aspect_w = 16,
1468                                 aspect_h = 16,
1469                                 length = 0.8,
1470                         },
1471                 },
1472                 {
1473                         name = "default_river_water_flowing_animated.png",
1474                         backface_culling = true,
1475                         animation = {
1476                                 type = "vertical_frames",
1477                                 aspect_w = 16,
1478                                 aspect_h = 16,
1479                                 length = 0.8,
1480                         },
1481                 },
1482         },
1483         alpha = 160,
1484         paramtype = "light",
1485         paramtype2 = "flowingliquid",
1486         walkable = false,
1487         pointable = false,
1488         diggable = false,
1489         buildable_to = true,
1490         is_ground_content = false,
1491         drop = "",
1492         drowning = 1,
1493         liquidtype = "flowing",
1494         liquid_alternative_flowing = "default:river_water_flowing",
1495         liquid_alternative_source = "default:river_water_source",
1496         liquid_viscosity = 1,
1497         liquid_renewable = false,
1498         liquid_range = 2,
1499         post_effect_color = {a = 103, r = 30, g = 76, b = 90},
1500         groups = {water = 3, liquid = 3, puts_out_fire = 1,
1501                 not_in_creative_inventory = 1, cools_lava = 1},
1502         sounds = default.node_sound_water_defaults(),
1503 })
1504
1505
1506 minetest.register_node("default:lava_source", {
1507         description = "Lava Source",
1508         drawtype = "liquid",
1509         tiles = {
1510                 {
1511                         name = "default_lava_source_animated.png",
1512                         animation = {
1513                                 type = "vertical_frames",
1514                                 aspect_w = 16,
1515                                 aspect_h = 16,
1516                                 length = 3.0,
1517                         },
1518                 },
1519         },
1520         special_tiles = {
1521                 -- New-style lava source material (mostly unused)
1522                 {
1523                         name = "default_lava_source_animated.png",
1524                         animation = {
1525                                 type = "vertical_frames",
1526                                 aspect_w = 16,
1527                                 aspect_h = 16,
1528                                 length = 3.0,
1529                         },
1530                         backface_culling = false,
1531                 },
1532         },
1533         paramtype = "light",
1534         light_source = default.LIGHT_MAX - 1,
1535         walkable = false,
1536         pointable = false,
1537         diggable = false,
1538         buildable_to = true,
1539         is_ground_content = false,
1540         drop = "",
1541         drowning = 1,
1542         liquidtype = "source",
1543         liquid_alternative_flowing = "default:lava_flowing",
1544         liquid_alternative_source = "default:lava_source",
1545         liquid_viscosity = 7,
1546         liquid_renewable = false,
1547         damage_per_second = 4 * 2,
1548         post_effect_color = {a = 191, r = 255, g = 64, b = 0},
1549         groups = {lava = 3, liquid = 2, igniter = 1},
1550 })
1551
1552 minetest.register_node("default:lava_flowing", {
1553         description = "Flowing Lava",
1554         drawtype = "flowingliquid",
1555         tiles = {"default_lava.png"},
1556         special_tiles = {
1557                 {
1558                         name = "default_lava_flowing_animated.png",
1559                         backface_culling = false,
1560                         animation = {
1561                                 type = "vertical_frames",
1562                                 aspect_w = 16,
1563                                 aspect_h = 16,
1564                                 length = 3.3,
1565                         },
1566                 },
1567                 {
1568                         name = "default_lava_flowing_animated.png",
1569                         backface_culling = true,
1570                         animation = {
1571                                 type = "vertical_frames",
1572                                 aspect_w = 16,
1573                                 aspect_h = 16,
1574                                 length = 3.3,
1575                         },
1576                 },
1577         },
1578         paramtype = "light",
1579         paramtype2 = "flowingliquid",
1580         light_source = default.LIGHT_MAX - 1,
1581         walkable = false,
1582         pointable = false,
1583         diggable = false,
1584         buildable_to = true,
1585         is_ground_content = false,
1586         drop = "",
1587         drowning = 1,
1588         liquidtype = "flowing",
1589         liquid_alternative_flowing = "default:lava_flowing",
1590         liquid_alternative_source = "default:lava_source",
1591         liquid_viscosity = 7,
1592         liquid_renewable = false,
1593         damage_per_second = 4 * 2,
1594         post_effect_color = {a = 191, r = 255, g = 64, b = 0},
1595         groups = {lava = 3, liquid = 2, igniter = 1,
1596                 not_in_creative_inventory = 1},
1597 })
1598
1599 --
1600 -- Tools / "Advanced" crafting / Non-"natural"
1601 --
1602
1603 local chest_formspec =
1604         "size[8,9]" ..
1605         default.gui_bg ..
1606         default.gui_bg_img ..
1607         default.gui_slots ..
1608         "list[current_name;main;0,0.3;8,4;]" ..
1609         "list[current_player;main;0,4.85;8,1;]" ..
1610         "list[current_player;main;0,6.08;8,3;8]" ..
1611         "listring[current_name;main]" ..
1612         "listring[current_player;main]" ..
1613         default.get_hotbar_bg(0,4.85)
1614
1615 local function get_locked_chest_formspec(pos)
1616         local spos = pos.x .. "," .. pos.y .. "," .. pos.z
1617         local formspec =
1618                 "size[8,9]" ..
1619                 default.gui_bg ..
1620                 default.gui_bg_img ..
1621                 default.gui_slots ..
1622                 "list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" ..
1623                 "list[current_player;main;0,4.85;8,1;]" ..
1624                 "list[current_player;main;0,6.08;8,3;8]" ..
1625                 "listring[nodemeta:" .. spos .. ";main]" ..
1626                 "listring[current_player;main]" ..
1627                 default.get_hotbar_bg(0,4.85)
1628  return formspec
1629 end
1630
1631 minetest.register_node("default:chest", {
1632         description = "Chest",
1633         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1634                 "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
1635         paramtype2 = "facedir",
1636         groups = {choppy = 2, oddly_breakable_by_hand = 2},
1637         legacy_facedir_simple = true,
1638         is_ground_content = false,
1639         sounds = default.node_sound_wood_defaults(),
1640
1641         on_construct = function(pos)
1642                 local meta = minetest.get_meta(pos)
1643                 meta:set_string("formspec", chest_formspec)
1644                 local inv = meta:get_inventory()
1645                 inv:set_size("main", 8*4)
1646         end,
1647         can_dig = function(pos,player)
1648                 local meta = minetest.get_meta(pos);
1649                 local inv = meta:get_inventory()
1650                 return inv:is_empty("main")
1651         end,
1652         on_metadata_inventory_move = function(pos, from_list, from_index,
1653                         to_list, to_index, count, player)
1654                 minetest.log("action", player:get_player_name() ..
1655                         " moves stuff in chest at " .. minetest.pos_to_string(pos))
1656         end,
1657     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1658                 minetest.log("action", player:get_player_name() ..
1659                         " moves " .. stack:get_name() ..
1660                         " to chest at " .. minetest.pos_to_string(pos))
1661         end,
1662     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1663                 minetest.log("action", player:get_player_name() ..
1664                         " takes " .. stack:get_name() ..
1665                         " from chest at " .. minetest.pos_to_string(pos))
1666         end,
1667         on_blast = function(pos)
1668                 local drops = {}
1669                 default.get_inventory_drops(pos, "main", drops)
1670                 drops[#drops+1] = "default:chest"
1671                 minetest.remove_node(pos)
1672                 return drops
1673         end,
1674 })
1675
1676 minetest.register_node("default:chest_locked", {
1677         description = "Locked Chest",
1678         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1679                 "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
1680         paramtype2 = "facedir",
1681         groups = {choppy = 2, oddly_breakable_by_hand = 2},
1682         legacy_facedir_simple = true,
1683         is_ground_content = false,
1684         sounds = default.node_sound_wood_defaults(),
1685
1686         after_place_node = function(pos, placer)
1687                 local meta = minetest.get_meta(pos)
1688                 meta:set_string("owner", placer:get_player_name() or "")
1689                 meta:set_string("infotext", "Locked Chest (owned by " ..
1690                                 meta:get_string("owner") .. ")")
1691         end,
1692         on_construct = function(pos)
1693                 local meta = minetest.get_meta(pos)
1694                 meta:set_string("owner", "")
1695                 local inv = meta:get_inventory()
1696                 inv:set_size("main", 8 * 4)
1697         end,
1698         can_dig = function(pos,player)
1699                 local meta = minetest.get_meta(pos);
1700                 local inv = meta:get_inventory()
1701                 return inv:is_empty("main") and default.can_interact_with_node(player, pos)
1702         end,
1703         allow_metadata_inventory_move = function(pos, from_list, from_index,
1704                         to_list, to_index, count, player)
1705                 if not default.can_interact_with_node(player, pos) then
1706                         return 0
1707                 end
1708                 return count
1709         end,
1710     allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1711                 if not default.can_interact_with_node(player, pos) then
1712                         return 0
1713                 end
1714                 return stack:get_count()
1715         end,
1716     allow_metadata_inventory_take = function(pos, listname, index, stack, player)
1717                 if not default.can_interact_with_node(player, pos) then
1718                         return 0
1719                 end
1720                 return stack:get_count()
1721         end,
1722     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1723                 minetest.log("action", player:get_player_name() ..
1724                         " moves " .. stack:get_name() ..
1725                         " to locked chest at " .. minetest.pos_to_string(pos))
1726         end,
1727     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1728                 minetest.log("action", player:get_player_name() ..
1729                         " takes " .. stack:get_name()  ..
1730                         " from locked chest at " .. minetest.pos_to_string(pos))
1731         end,
1732         on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
1733                 if default.can_interact_with_node(clicker, pos) then
1734                         minetest.show_formspec(
1735                                 clicker:get_player_name(),
1736                                 "default:chest_locked",
1737                                 get_locked_chest_formspec(pos)
1738                         )
1739                 end
1740                 return itemstack
1741         end,
1742         on_blast = function() end,
1743         on_key_use = function(pos, player)
1744                 local secret = minetest.get_meta(pos):get_string("key_lock_secret")
1745                 local itemstack = player:get_wielded_item()
1746                 local key_meta = itemstack:get_meta()
1747
1748                 if key_meta:get_string("secret") == "" then
1749                         key_meta:set_string("secret", minetest.parse_json(itemstack:get_metadata()).secret)
1750                 end
1751
1752                 if secret ~= key_meta:get_string("secret") then
1753                         return
1754                 end
1755
1756                 minetest.show_formspec(
1757                         player:get_player_name(),
1758                         "default:chest_locked",
1759                         get_locked_chest_formspec(pos)
1760                 )
1761         end,
1762         on_skeleton_key_use = function(pos, player, newsecret)
1763                 local meta = minetest.get_meta(pos)
1764                 local owner = meta:get_string("owner")
1765                 local name = player:get_player_name()
1766
1767                 -- verify placer is owner of lockable chest
1768                 if owner ~= name then
1769                         minetest.record_protection_violation(pos, name)
1770                         minetest.chat_send_player(name, "You do not own this chest.")
1771                         return nil
1772                 end
1773
1774                 local secret = meta:get_string("key_lock_secret")
1775                 if secret == "" then
1776                         secret = newsecret
1777                         meta:set_string("key_lock_secret", secret)
1778                 end
1779
1780                 return secret, "a locked chest", owner
1781         end,
1782 })
1783
1784
1785 local bookshelf_formspec =
1786         "size[8,7;]" ..
1787         default.gui_bg ..
1788         default.gui_bg_img ..
1789         default.gui_slots ..
1790         "list[context;books;0,0.3;8,2;]" ..
1791         "list[current_player;main;0,2.85;8,1;]" ..
1792         "list[current_player;main;0,4.08;8,3;8]" ..
1793         "listring[context;books]" ..
1794         "listring[current_player;main]" ..
1795         default.get_hotbar_bg(0,2.85)
1796
1797 local function get_bookshelf_formspec(inv)
1798         local formspec = bookshelf_formspec
1799         local invlist = inv and inv:get_list("books")
1800         -- Inventory slots overlay
1801         local bx, by = 0, 0.3
1802         for i = 1, 16 do
1803                 if i == 9 then
1804                         bx = 0
1805                         by = by + 1
1806                 end
1807                 if not invlist or invlist[i]:is_empty() then
1808                         formspec = formspec ..
1809                                 "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"
1810                 end
1811                 bx = bx + 1
1812         end
1813         return formspec
1814 end
1815
1816 minetest.register_node("default:bookshelf", {
1817         description = "Bookshelf",
1818         tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
1819                 "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"},
1820         paramtype2 = "facedir",
1821         is_ground_content = false,
1822         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
1823         sounds = default.node_sound_wood_defaults(),
1824
1825         on_construct = function(pos)
1826                 local meta = minetest.get_meta(pos)
1827                 meta:set_string("formspec", get_bookshelf_formspec(nil))
1828                 local inv = meta:get_inventory()
1829                 inv:set_size("books", 8 * 2)
1830         end,
1831         can_dig = function(pos,player)
1832                 local inv = minetest.get_meta(pos):get_inventory()
1833                 return inv:is_empty("books")
1834         end,
1835         allow_metadata_inventory_put = function(pos, listname, index, stack)
1836                 if minetest.get_item_group(stack:get_name(), "book") ~= 0 then
1837                         return stack:get_count()
1838                 end
1839                 return 0
1840         end,
1841         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1842                 minetest.log("action", player:get_player_name() ..
1843                         " moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
1844                 local meta = minetest.get_meta(pos)
1845                 meta:set_string("formspec", get_bookshelf_formspec(meta:get_inventory()))
1846         end,
1847         on_metadata_inventory_put = function(pos, listname, index, stack, player)
1848                 minetest.log("action", player:get_player_name() ..
1849                         " moves stuff to bookshelf at " .. minetest.pos_to_string(pos))
1850                 local meta = minetest.get_meta(pos)
1851                 meta:set_string("formspec", get_bookshelf_formspec(meta:get_inventory()))
1852         end,
1853         on_metadata_inventory_take = function(pos, listname, index, stack, player)
1854                 minetest.log("action", player:get_player_name() ..
1855                         " takes stuff from bookshelf at " .. minetest.pos_to_string(pos))
1856                 local meta = minetest.get_meta(pos)
1857                 meta:set_string("formspec", get_bookshelf_formspec(meta:get_inventory()))
1858         end,
1859         on_blast = function(pos)
1860                 local drops = {}
1861                 default.get_inventory_drops(pos, "books", drops)
1862                 drops[#drops+1] = "default:bookshelf"
1863                 minetest.remove_node(pos)
1864                 return drops
1865         end,
1866 })
1867
1868 local function register_sign(material, desc, def)
1869         minetest.register_node("default:sign_wall_" .. material, {
1870                 description = desc .. " Sign",
1871                 drawtype = "nodebox",
1872                 tiles = {"default_sign_wall_" .. material .. ".png"},
1873                 inventory_image = "default_sign_" .. material .. ".png",
1874                 wield_image = "default_sign_" .. material .. ".png",
1875                 paramtype = "light",
1876                 paramtype2 = "wallmounted",
1877                 sunlight_propagates = true,
1878                 is_ground_content = false,
1879                 walkable = false,
1880                 node_box = {
1881                         type = "wallmounted",
1882                         wall_top    = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
1883                         wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
1884                         wall_side   = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
1885                 },
1886                 groups = def.groups,
1887                 legacy_wallmounted = true,
1888                 sounds = def.sounds,
1889
1890                 on_construct = function(pos)
1891                         --local n = minetest.get_node(pos)
1892                         local meta = minetest.get_meta(pos)
1893                         meta:set_string("formspec", "field[text;;${text}]")
1894                 end,
1895                 on_receive_fields = function(pos, formname, fields, sender)
1896                         --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
1897                         local player_name = sender:get_player_name()
1898                         if minetest.is_protected(pos, player_name) then
1899                                 minetest.record_protection_violation(pos, player_name)
1900                                 return
1901                         end
1902                         local meta = minetest.get_meta(pos)
1903                         if not fields.text then return end
1904                         minetest.log("action", (player_name or "") .. " wrote \"" ..
1905                                 fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
1906                         meta:set_string("text", fields.text)
1907                         meta:set_string("infotext", '"' .. fields.text .. '"')
1908                 end,
1909         })
1910 end
1911
1912 register_sign("wood", "Wooden", {
1913         sounds = default.node_sound_wood_defaults(),
1914         groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
1915 })
1916
1917 register_sign("steel", "Steel", {
1918         sounds = default.node_sound_metal_defaults(),
1919         groups = {cracky = 2, attached_node = 1}
1920 })
1921
1922 minetest.register_node("default:ladder_wood", {
1923         description = "Wooden Ladder",
1924         drawtype = "signlike",
1925         tiles = {"default_ladder_wood.png"},
1926         inventory_image = "default_ladder_wood.png",
1927         wield_image = "default_ladder_wood.png",
1928         paramtype = "light",
1929         paramtype2 = "wallmounted",
1930         sunlight_propagates = true,
1931         walkable = false,
1932         climbable = true,
1933         is_ground_content = false,
1934         selection_box = {
1935                 type = "wallmounted",
1936                 --wall_top = = <default>
1937                 --wall_bottom = = <default>
1938                 --wall_side = = <default>
1939         },
1940         groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
1941         legacy_wallmounted = true,
1942         sounds = default.node_sound_wood_defaults(),
1943 })
1944
1945 minetest.register_node("default:ladder_steel", {
1946         description = "Steel Ladder",
1947         drawtype = "signlike",
1948         tiles = {"default_ladder_steel.png"},
1949         inventory_image = "default_ladder_steel.png",
1950         wield_image = "default_ladder_steel.png",
1951         paramtype = "light",
1952         paramtype2 = "wallmounted",
1953         sunlight_propagates = true,
1954         walkable = false,
1955         climbable = true,
1956         is_ground_content = false,
1957         selection_box = {
1958                 type = "wallmounted",
1959                 --wall_top = = <default>
1960                 --wall_bottom = = <default>
1961                 --wall_side = = <default>
1962         },
1963         groups = {cracky = 2},
1964         sounds = default.node_sound_metal_defaults(),
1965 })
1966
1967 default.register_fence("default:fence_wood", {
1968         description = "Wooden Fence",
1969         texture = "default_fence_wood.png",
1970         inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1971         wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1972         material = "default:wood",
1973         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1974         sounds = default.node_sound_wood_defaults()
1975 })
1976
1977 default.register_fence("default:fence_acacia_wood", {
1978         description = "Acacia Fence",
1979         texture = "default_fence_acacia_wood.png",
1980         inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1981         wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1982         material = "default:acacia_wood",
1983         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1984         sounds = default.node_sound_wood_defaults()
1985 })
1986
1987 default.register_fence("default:fence_junglewood", {
1988         description = "Junglewood Fence",
1989         texture = "default_fence_junglewood.png",
1990         inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
1991         wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
1992         material = "default:junglewood",
1993         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1994         sounds = default.node_sound_wood_defaults()
1995 })
1996
1997 default.register_fence("default:fence_pine_wood", {
1998         description = "Pine Fence",
1999         texture = "default_fence_pine_wood.png",
2000         inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
2001         wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
2002         material = "default:pine_wood",
2003         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2004         sounds = default.node_sound_wood_defaults()
2005 })
2006
2007 default.register_fence("default:fence_aspen_wood", {
2008         description = "Aspen Fence",
2009         texture = "default_fence_aspen_wood.png",
2010         inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
2011         wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
2012         material = "default:aspen_wood",
2013         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2014         sounds = default.node_sound_wood_defaults()
2015 })
2016
2017 minetest.register_node("default:glass", {
2018         description = "Glass",
2019         drawtype = "glasslike_framed_optional",
2020         tiles = {"default_glass.png", "default_glass_detail.png"},
2021         paramtype = "light",
2022         sunlight_propagates = true,
2023         is_ground_content = false,
2024         groups = {cracky = 3, oddly_breakable_by_hand = 3},
2025         sounds = default.node_sound_glass_defaults(),
2026 })
2027
2028 minetest.register_node("default:obsidian_glass", {
2029         description = "Obsidian Glass",
2030         drawtype = "glasslike_framed_optional",
2031         tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
2032         paramtype = "light",
2033         is_ground_content = false,
2034         sunlight_propagates = true,
2035         sounds = default.node_sound_glass_defaults(),
2036         groups = {cracky = 3},
2037 })
2038
2039
2040 minetest.register_node("default:brick", {
2041         description = "Brick Block",
2042         paramtype2 = "facedir",
2043         place_param2 = 0,
2044         tiles = {"default_brick.png"},
2045         is_ground_content = false,
2046         groups = {cracky = 3},
2047         sounds = default.node_sound_stone_defaults(),
2048 })
2049
2050
2051 minetest.register_node("default:meselamp", {
2052         description = "Mese Lamp",
2053         drawtype = "glasslike",
2054         tiles = {"default_meselamp.png"},
2055         paramtype = "light",
2056         sunlight_propagates = true,
2057         is_ground_content = false,
2058         groups = {cracky = 3, oddly_breakable_by_hand = 3},
2059         sounds = default.node_sound_glass_defaults(),
2060         light_source = default.LIGHT_MAX,
2061 })
2062
2063 minetest.register_node("default:mese_post_light", {
2064         description = "Mese Post Light",
2065         tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
2066                 "default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
2067                 "default_mese_post_light_side.png", "default_mese_post_light_side.png"},
2068         wield_image = "default_mese_post_light_side.png",
2069         drawtype = "nodebox",
2070         node_box = {
2071                 type = "fixed",
2072                 fixed = {
2073                         {-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
2074                 },
2075         },
2076         paramtype = "light",
2077         light_source = default.LIGHT_MAX,
2078         sunlight_propagates = true,
2079         is_ground_content = false,
2080         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2081         sounds = default.node_sound_wood_defaults(),
2082 })
2083
2084 --
2085 -- Misc
2086 --
2087
2088 minetest.register_node("default:cloud", {
2089         description = "Cloud",
2090         tiles = {"default_cloud.png"},
2091         is_ground_content = false,
2092         sounds = default.node_sound_defaults(),
2093         groups = {not_in_creative_inventory = 1},
2094 })
2095
2096 --
2097 -- register trees for leafdecay
2098 --
2099
2100 if minetest.get_mapgen_setting("mg_name") == "v6" then
2101         default.register_leafdecay({
2102                 trunks = {"default:tree"},
2103                 leaves = {"default:apple", "default:leaves"},
2104                 radius = 2,
2105         })
2106
2107         default.register_leafdecay({
2108                 trunks = {"default:jungletree"},
2109                 leaves = {"default:jungleleaves"},
2110                 radius = 3,
2111         })
2112
2113         default.register_leafdecay({
2114                 trunks = {"default:pine_tree"},
2115                 leaves = {"default:pine_needles"},
2116                 radius = 3,
2117         })
2118 else
2119         default.register_leafdecay({
2120                 trunks = {"default:tree"},
2121                 leaves = {"default:apple", "default:leaves"},
2122                 radius = 3,
2123         })
2124
2125         default.register_leafdecay({
2126                 trunks = {"default:jungletree"},
2127                 leaves = {"default:jungleleaves"},
2128                 radius = 2,
2129         })
2130
2131         default.register_leafdecay({
2132                 trunks = {"default:pine_tree"},
2133                 leaves = {"default:pine_needles"},
2134                 radius = 2,
2135         })
2136 end
2137
2138 default.register_leafdecay({
2139         trunks = {"default:acacia_tree"},
2140         leaves = {"default:acacia_leaves"},
2141         radius = 2,
2142 })
2143
2144 default.register_leafdecay({
2145         trunks = {"default:aspen_tree"},
2146         leaves = {"default:aspen_leaves"},
2147         radius = 3,
2148 })