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