New glass, glass stair/slab, and glass door textures
[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 default:dirt_with_coniferous_litter
55
56 default:permafrost
57 default:permafrost_with_stones
58 default:permafrost_with_moss
59
60 default:sand
61 default:desert_sand
62 default:silver_sand
63
64 default:gravel
65
66 default:clay
67
68 default:snow
69 default:snowblock
70 default:ice
71 default:cave_ice
72
73 Trees
74 -----
75 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
76
77 default:tree
78 default:wood
79 default:leaves
80 default:sapling
81 default:apple
82
83 default:jungletree
84 default:junglewood
85 default:jungleleaves
86 default:junglesapling
87 default:emergent_jungle_sapling
88
89 default:pine_tree
90 default:pine_wood
91 default:pine_needles
92 default:pine_sapling
93
94 default:acacia_tree
95 default:acacia_wood
96 default:acacia_leaves
97 default:acacia_sapling
98
99 default:aspen_tree
100 default:aspen_wood
101 default:aspen_leaves
102 default:aspen_sapling
103
104 Ores
105 ----
106 (1. In stone 2. Blocks)
107
108 default:stone_with_coal
109 default:coalblock
110
111 default:stone_with_iron
112 default:steelblock
113
114 default:stone_with_copper
115 default:copperblock
116
117 default:stone_with_tin
118 default:tinblock
119
120 default:bronzeblock
121
122 default:stone_with_gold
123 default:goldblock
124
125 default:stone_with_mese
126 default:mese
127
128 default:stone_with_diamond
129 default:diamondblock
130
131 Plantlife
132 ---------
133
134 default:cactus
135 default:papyrus
136 default:dry_shrub
137 default:junglegrass
138
139 default:grass_1
140 default:grass_2
141 default:grass_3
142 default:grass_4
143 default:grass_5
144
145 default:dry_grass_1
146 default:dry_grass_2
147 default:dry_grass_3
148 default:dry_grass_4
149 default:dry_grass_5
150
151 default:fern_1
152 default:fern_2
153 default:fern_3
154
155 default:marram_grass_1
156 default:marram_grass_2
157 default:marram_grass_3
158
159 default:bush_stem
160 default:bush_leaves
161 default:bush_sapling
162 default:acacia_bush_stem
163 default:acacia_bush_leaves
164 default:acacia_bush_sapling
165 default:pine_bush_stem
166 default:pine_bush_needles
167 default:pine_bush_sapling
168 default:blueberry_bush_leaves_with_berries
169 default:blueberry_bush_leaves
170 default:blueberry_bush_sapling
171
172 default:sand_with_kelp
173
174 Corals
175 ------
176
177 default:coral_brown
178 default:coral_orange
179 default:coral_skeleton
180
181 Liquids
182 -------
183 (1. Source 2. Flowing)
184
185 default:water_source
186 default:water_flowing
187
188 default:river_water_source
189 default:river_water_flowing
190
191 default:lava_source
192 default:lava_flowing
193
194 Tools / "Advanced" crafting / Non-"natural"
195 -------------------------------------------
196
197 default:bookshelf
198
199 default:sign_wall_wood
200 default:sign_wall_steel
201
202 default:ladder_wood
203 default:ladder_steel
204
205 default:fence_wood
206 default:fence_acacia_wood
207 default:fence_junglewood
208 default:fence_pine_wood
209 default:fence_aspen_wood
210
211 default:glass
212 default:obsidian_glass
213
214 default:brick
215
216 default:meselamp
217 default:mese_post_light
218
219 Misc
220 ----
221
222 default:cloud
223
224 --]]
225
226 --
227 -- Stone
228 --
229
230 minetest.register_node("default:stone", {
231         description = "Stone",
232         tiles = {"default_stone.png"},
233         groups = {cracky = 3, stone = 1},
234         drop = 'default:cobble',
235         legacy_mineral = true,
236         sounds = default.node_sound_stone_defaults(),
237 })
238
239 minetest.register_node("default:cobble", {
240         description = "Cobblestone",
241         tiles = {"default_cobble.png"},
242         is_ground_content = false,
243         groups = {cracky = 3, stone = 2},
244         sounds = default.node_sound_stone_defaults(),
245 })
246
247 minetest.register_node("default:stonebrick", {
248         description = "Stone Brick",
249         paramtype2 = "facedir",
250         place_param2 = 0,
251         tiles = {"default_stone_brick.png"},
252         is_ground_content = false,
253         groups = {cracky = 2, stone = 1},
254         sounds = default.node_sound_stone_defaults(),
255 })
256
257 minetest.register_node("default:stone_block", {
258         description = "Stone Block",
259         tiles = {"default_stone_block.png"},
260         is_ground_content = false,
261         groups = {cracky = 2, stone = 1},
262         sounds = default.node_sound_stone_defaults(),
263 })
264
265 minetest.register_node("default:mossycobble", {
266         description = "Mossy Cobblestone",
267         tiles = {"default_mossycobble.png"},
268         is_ground_content = false,
269         groups = {cracky = 3, stone = 1},
270         sounds = default.node_sound_stone_defaults(),
271 })
272
273
274 minetest.register_node("default:desert_stone", {
275         description = "Desert Stone",
276         tiles = {"default_desert_stone.png"},
277         groups = {cracky = 3, stone = 1},
278         drop = 'default:desert_cobble',
279         legacy_mineral = true,
280         sounds = default.node_sound_stone_defaults(),
281 })
282
283 minetest.register_node("default:desert_cobble", {
284         description = "Desert Cobblestone",
285         tiles = {"default_desert_cobble.png"},
286         is_ground_content = false,
287         groups = {cracky = 3, stone = 2},
288         sounds = default.node_sound_stone_defaults(),
289 })
290
291 minetest.register_node("default:desert_stonebrick", {
292         description = "Desert Stone Brick",
293         paramtype2 = "facedir",
294         place_param2 = 0,
295         tiles = {"default_desert_stone_brick.png"},
296         is_ground_content = false,
297         groups = {cracky = 2, stone = 1},
298         sounds = default.node_sound_stone_defaults(),
299 })
300
301 minetest.register_node("default:desert_stone_block", {
302         description = "Desert Stone Block",
303         tiles = {"default_desert_stone_block.png"},
304         is_ground_content = false,
305         groups = {cracky = 2, stone = 1},
306         sounds = default.node_sound_stone_defaults(),
307 })
308
309 minetest.register_node("default:sandstone", {
310         description = "Sandstone",
311         tiles = {"default_sandstone.png"},
312         groups = {crumbly = 1, cracky = 3},
313         sounds = default.node_sound_stone_defaults(),
314 })
315
316 minetest.register_node("default:sandstonebrick", {
317         description = "Sandstone Brick",
318         paramtype2 = "facedir",
319         place_param2 = 0,
320         tiles = {"default_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:sandstone_block", {
327         description = "Sandstone Block",
328         tiles = {"default_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:desert_sandstone", {
335         description = "Desert Sandstone",
336         tiles = {"default_desert_sandstone.png"},
337         groups = {crumbly = 1, cracky = 3},
338         sounds = default.node_sound_stone_defaults(),
339 })
340
341 minetest.register_node("default:desert_sandstone_brick", {
342         description = "Desert Sandstone Brick",
343         paramtype2 = "facedir",
344         place_param2 = 0,
345         tiles = {"default_desert_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:desert_sandstone_block", {
352         description = "Desert Sandstone Block",
353         tiles = {"default_desert_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:silver_sandstone", {
360         description = "Silver Sandstone",
361         tiles = {"default_silver_sandstone.png"},
362         groups = {crumbly = 1, cracky = 3},
363         sounds = default.node_sound_stone_defaults(),
364 })
365
366 minetest.register_node("default:silver_sandstone_brick", {
367         description = "Silver Sandstone Brick",
368         paramtype2 = "facedir",
369         place_param2 = 0,
370         tiles = {"default_silver_sandstone_brick.png"},
371         is_ground_content = false,
372         groups = {cracky = 2},
373         sounds = default.node_sound_stone_defaults(),
374 })
375
376 minetest.register_node("default:silver_sandstone_block", {
377         description = "Silver Sandstone Block",
378         tiles = {"default_silver_sandstone_block.png"},
379         is_ground_content = false,
380         groups = {cracky = 2},
381         sounds = default.node_sound_stone_defaults(),
382 })
383
384 minetest.register_node("default:obsidian", {
385         description = "Obsidian",
386         tiles = {"default_obsidian.png"},
387         sounds = default.node_sound_stone_defaults(),
388         groups = {cracky = 1, level = 2},
389 })
390
391 minetest.register_node("default:obsidianbrick", {
392         description = "Obsidian Brick",
393         paramtype2 = "facedir",
394         place_param2 = 0,
395         tiles = {"default_obsidian_brick.png"},
396         is_ground_content = false,
397         sounds = default.node_sound_stone_defaults(),
398         groups = {cracky = 1, level = 2},
399 })
400
401 minetest.register_node("default:obsidian_block", {
402         description = "Obsidian Block",
403         tiles = {"default_obsidian_block.png"},
404         is_ground_content = false,
405         sounds = default.node_sound_stone_defaults(),
406         groups = {cracky = 1, level = 2},
407 })
408
409 --
410 -- Soft / Non-Stone
411 --
412
413 minetest.register_node("default:dirt", {
414         description = "Dirt",
415         tiles = {"default_dirt.png"},
416         groups = {crumbly = 3, soil = 1},
417         sounds = default.node_sound_dirt_defaults(),
418 })
419
420 minetest.register_node("default:dirt_with_grass", {
421         description = "Dirt with Grass",
422         tiles = {"default_grass.png", "default_dirt.png",
423                 {name = "default_dirt.png^default_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.25},
429         }),
430 })
431
432 minetest.register_node("default:dirt_with_grass_footsteps", {
433         description = "Dirt with Grass and Footsteps",
434         tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
435                 {name = "default_dirt.png^default_grass_side.png",
436                         tileable_vertical = false}},
437         groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
438         drop = 'default:dirt',
439         sounds = default.node_sound_dirt_defaults({
440                 footstep = {name = "default_grass_footstep", gain = 0.25},
441         }),
442 })
443
444 minetest.register_node("default:dirt_with_dry_grass", {
445         description = "Dirt with Dry Grass",
446         tiles = {"default_dry_grass.png",
447                 "default_dirt.png",
448                 {name = "default_dirt.png^default_dry_grass_side.png",
449                         tileable_vertical = false}},
450         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
451         drop = 'default:dirt',
452         sounds = default.node_sound_dirt_defaults({
453                 footstep = {name = "default_grass_footstep", gain = 0.4},
454         }),
455 })
456
457 minetest.register_node("default:dirt_with_snow", {
458         description = "Dirt with Snow",
459         tiles = {"default_snow.png", "default_dirt.png",
460                 {name = "default_dirt.png^default_snow_side.png",
461                         tileable_vertical = false}},
462         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
463         drop = 'default:dirt',
464         sounds = default.node_sound_dirt_defaults({
465                 footstep = {name = "default_snow_footstep", gain = 0.2},
466         }),
467 })
468
469 minetest.register_node("default:dirt_with_rainforest_litter", {
470         description = "Dirt with Rainforest Litter",
471         tiles = {
472                 "default_rainforest_litter.png",
473                 "default_dirt.png",
474                 {name = "default_dirt.png^default_rainforest_litter_side.png",
475                         tileable_vertical = false}
476         },
477         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
478         drop = "default:dirt",
479         sounds = default.node_sound_dirt_defaults({
480                 footstep = {name = "default_grass_footstep", gain = 0.4},
481         }),
482 })
483
484 minetest.register_node("default:dirt_with_coniferous_litter", {
485         description = "Dirt with Coniferous Litter",
486         tiles = {
487                 "default_coniferous_litter.png",
488                 "default_dirt.png",
489                 {name = "default_dirt.png^default_coniferous_litter_side.png",
490                         tileable_vertical = false}
491         },
492         groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
493         drop = "default:dirt",
494         sounds = default.node_sound_dirt_defaults({
495                 footstep = {name = "default_grass_footstep", gain = 0.4},
496         }),
497 })
498
499 minetest.register_node("default:permafrost", {
500         description = "Permafrost",
501         tiles = {"default_permafrost.png"},
502         groups = {cracky = 3},
503         sounds = default.node_sound_dirt_defaults(),
504 })
505
506 minetest.register_node("default:permafrost_with_stones", {
507         description = "Permafrost with Stones",
508         tiles = {"default_permafrost.png^default_stones.png",
509                 "default_permafrost.png"},
510         groups = {cracky = 3},
511         drop = "default:permafrost",
512         sounds = default.node_sound_gravel_defaults(),
513 })
514
515 minetest.register_node("default:permafrost_with_moss", {
516         description = "Permafrost with Moss",
517         tiles = {"default_moss.png", "default_permafrost.png",
518                 {name = "default_permafrost.png^default_moss_side.png",
519                         tileable_vertical = false}},
520         groups = {cracky = 3},
521         drop = "default:permafrost",
522         sounds = default.node_sound_dirt_defaults({
523                 footstep = {name = "default_grass_footstep", gain = 0.25},
524         }),
525 })
526
527 minetest.register_node("default:sand", {
528         description = "Sand",
529         tiles = {"default_sand.png"},
530         groups = {crumbly = 3, falling_node = 1, sand = 1},
531         sounds = default.node_sound_sand_defaults(),
532 })
533
534 minetest.register_node("default:desert_sand", {
535         description = "Desert Sand",
536         tiles = {"default_desert_sand.png"},
537         groups = {crumbly = 3, falling_node = 1, sand = 1},
538         sounds = default.node_sound_sand_defaults(),
539 })
540
541 minetest.register_node("default:silver_sand", {
542         description = "Silver Sand",
543         tiles = {"default_silver_sand.png"},
544         groups = {crumbly = 3, falling_node = 1, sand = 1},
545         sounds = default.node_sound_sand_defaults(),
546 })
547
548
549 minetest.register_node("default:gravel", {
550         description = "Gravel",
551         tiles = {"default_gravel.png"},
552         groups = {crumbly = 2, falling_node = 1},
553         sounds = default.node_sound_gravel_defaults(),
554         drop = {
555                 max_items = 1,
556                 items = {
557                         {items = {'default:flint'}, rarity = 16},
558                         {items = {'default:gravel'}}
559                 }
560         }
561 })
562
563 minetest.register_node("default:clay", {
564         description = "Clay",
565         tiles = {"default_clay.png"},
566         groups = {crumbly = 3},
567         drop = 'default:clay_lump 4',
568         sounds = default.node_sound_dirt_defaults(),
569 })
570
571
572 minetest.register_node("default:snow", {
573         description = "Snow",
574         tiles = {"default_snow.png"},
575         inventory_image = "default_snowball.png",
576         wield_image = "default_snowball.png",
577         paramtype = "light",
578         buildable_to = true,
579         floodable = true,
580         drawtype = "nodebox",
581         node_box = {
582                 type = "fixed",
583                 fixed = {
584                         {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
585                 },
586         },
587         collision_box = {
588                 type = "fixed",
589                 fixed = {
590                         {-0.5, -0.5, -0.5, 0.5, -7 / 16, 0.5},
591                 },
592         },
593         groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1, snowy = 1},
594         sounds = default.node_sound_snow_defaults(),
595
596         on_construct = function(pos)
597                 pos.y = pos.y - 1
598                 if minetest.get_node(pos).name == "default:dirt_with_grass" then
599                         minetest.set_node(pos, {name = "default:dirt_with_snow"})
600                 end
601         end,
602 })
603
604 minetest.register_node("default:snowblock", {
605         description = "Snow Block",
606         tiles = {"default_snow.png"},
607         groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1},
608         sounds = default.node_sound_snow_defaults(),
609
610         on_construct = function(pos)
611                 pos.y = pos.y - 1
612                 if minetest.get_node(pos).name == "default:dirt_with_grass" then
613                         minetest.set_node(pos, {name = "default:dirt_with_snow"})
614                 end
615         end,
616 })
617
618 -- 'is ground content = false' to avoid tunnels in sea ice or ice rivers
619 minetest.register_node("default:ice", {
620         description = "Ice",
621         tiles = {"default_ice.png"},
622         is_ground_content = false,
623         paramtype = "light",
624         groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
625         sounds = default.node_sound_glass_defaults(),
626 })
627
628 -- Mapgen-placed ice with 'is ground content = true' to contain tunnels
629 minetest.register_node("default:cave_ice", {
630         description = "Cave Ice",
631         tiles = {"default_ice.png"},
632         paramtype = "light",
633         groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3,
634                 not_in_creative_inventory = 1},
635         drop = "default:ice",
636         sounds = default.node_sound_glass_defaults(),
637 })
638
639 --
640 -- Trees
641 --
642
643 minetest.register_node("default:tree", {
644         description = "Apple Tree",
645         tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
646         paramtype2 = "facedir",
647         is_ground_content = false,
648         groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
649         sounds = default.node_sound_wood_defaults(),
650
651         on_place = minetest.rotate_node
652 })
653
654 minetest.register_node("default:wood", {
655         description = "Apple Wood Planks",
656         paramtype2 = "facedir",
657         place_param2 = 0,
658         tiles = {"default_wood.png"},
659         is_ground_content = false,
660         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
661         sounds = default.node_sound_wood_defaults(),
662 })
663
664 minetest.register_node("default:sapling", {
665         description = "Apple Tree Sapling",
666         drawtype = "plantlike",
667         tiles = {"default_sapling.png"},
668         inventory_image = "default_sapling.png",
669         wield_image = "default_sapling.png",
670         paramtype = "light",
671         sunlight_propagates = true,
672         walkable = false,
673         on_timer = default.grow_sapling,
674         selection_box = {
675                 type = "fixed",
676                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
677         },
678         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
679                 attached_node = 1, sapling = 1},
680         sounds = default.node_sound_leaves_defaults(),
681
682         on_construct = function(pos)
683                 minetest.get_node_timer(pos):start(math.random(300, 1500))
684         end,
685
686         on_place = function(itemstack, placer, pointed_thing)
687                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
688                         "default:sapling",
689                         -- minp, maxp to be checked, relative to sapling pos
690                         -- minp_relative.y = 1 because sapling pos has been checked
691                         {x = -3, y = 1, z = -3},
692                         {x = 3, y = 6, z = 3},
693                         -- maximum interval of interior volume check
694                         4)
695
696                 return itemstack
697         end,
698 })
699
700 minetest.register_node("default:leaves", {
701         description = "Apple Tree Leaves",
702         drawtype = "allfaces_optional",
703         waving = 1,
704         tiles = {"default_leaves.png"},
705         special_tiles = {"default_leaves_simple.png"},
706         paramtype = "light",
707         is_ground_content = false,
708         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
709         drop = {
710                 max_items = 1,
711                 items = {
712                         {
713                                 -- player will get sapling with 1/20 chance
714                                 items = {'default:sapling'},
715                                 rarity = 20,
716                         },
717                         {
718                                 -- player will get leaves only if he get no saplings,
719                                 -- this is because max_items is 1
720                                 items = {'default:leaves'},
721                         }
722                 }
723         },
724         sounds = default.node_sound_leaves_defaults(),
725
726         after_place_node = default.after_place_leaves,
727 })
728
729 minetest.register_node("default:apple", {
730         description = "Apple",
731         drawtype = "plantlike",
732         tiles = {"default_apple.png"},
733         inventory_image = "default_apple.png",
734         paramtype = "light",
735         sunlight_propagates = true,
736         walkable = false,
737         is_ground_content = false,
738         selection_box = {
739                 type = "fixed",
740                 fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
741         },
742         groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
743                 leafdecay = 3, leafdecay_drop = 1, food_apple = 1},
744         on_use = minetest.item_eat(2),
745         sounds = default.node_sound_leaves_defaults(),
746
747         after_place_node = function(pos, placer, itemstack)
748                 minetest.set_node(pos, {name = "default:apple", param2 = 1})
749         end,
750
751         after_dig_node = function(pos, oldnode, oldmetadata, digger)
752                 if oldnode.param2 == 0 then
753                         minetest.set_node(pos, {name = "default:apple_mark"})
754                         minetest.get_node_timer(pos):start(math.random(300, 1500))
755                 end
756         end,
757 })
758
759 minetest.register_node("default:apple_mark", {
760         description = "Apple Marker",
761         drawtype = "airlike",
762         paramtype = "light",
763         sunlight_propagates = true,
764         walkable = false,
765         pointable = false,
766         diggable = false,
767         buildable_to = true,
768         drop = "",
769         groups = {not_in_creative_inventory = 1},
770         on_timer = function(pos, elapsed)
771                 if not minetest.find_node_near(pos, 1, "default:leaves") then
772                         minetest.remove_node(pos)
773                 elseif minetest.get_node_light(pos) < 11 then
774                         minetest.get_node_timer(pos):start(200)
775                 else
776                         minetest.set_node(pos, {name = "default:apple"})
777                 end
778         end
779 })
780
781
782 minetest.register_node("default:jungletree", {
783         description = "Jungle Tree",
784         tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
785                 "default_jungletree.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:junglewood", {
795         description = "Jungle Wood Planks",
796         paramtype2 = "facedir",
797         place_param2 = 0,
798         tiles = {"default_junglewood.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:jungleleaves", {
805         description = "Jungle Tree Leaves",
806         drawtype = "allfaces_optional",
807         waving = 1,
808         tiles = {"default_jungleleaves.png"},
809         special_tiles = {"default_jungleleaves_simple.png"},
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:junglesapling'}, rarity = 20},
817                         {items = {'default:jungleleaves'}}
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:junglesapling", {
826         description = "Jungle Tree Sapling",
827         drawtype = "plantlike",
828         tiles = {"default_junglesapling.png"},
829         inventory_image = "default_junglesapling.png",
830         wield_image = "default_junglesapling.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(300, 1500))
845         end,
846
847         on_place = function(itemstack, placer, pointed_thing)
848                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
849                         "default:junglesapling",
850                         -- minp, maxp to be checked, relative to sapling pos
851                         -- minp_relative.y = 1 because sapling pos has been checked
852                         {x = -2, y = 1, z = -2},
853                         {x = 2, y = 15, z = 2},
854                         -- maximum interval of interior volume check
855                         4)
856
857                 return itemstack
858         end,
859 })
860
861 minetest.register_node("default:emergent_jungle_sapling", {
862         description = "Emergent Jungle Tree Sapling",
863         drawtype = "plantlike",
864         tiles = {"default_emergent_jungle_sapling.png"},
865         inventory_image = "default_emergent_jungle_sapling.png",
866         wield_image = "default_emergent_jungle_sapling.png",
867         paramtype = "light",
868         sunlight_propagates = true,
869         walkable = false,
870         on_timer = default.grow_sapling,
871         selection_box = {
872                 type = "fixed",
873                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
874         },
875         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
876                 attached_node = 1, sapling = 1},
877         sounds = default.node_sound_leaves_defaults(),
878
879         on_construct = function(pos)
880                 minetest.get_node_timer(pos):start(math.random(300, 1500))
881         end,
882
883         on_place = function(itemstack, placer, pointed_thing)
884                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
885                         "default:emergent_jungle_sapling",
886                         -- minp, maxp to be checked, relative to sapling pos
887                         {x = -3, y = -5, z = -3},
888                         {x = 3, y = 31, z = 3},
889                         -- maximum interval of interior volume check
890                         4)
891
892                 return itemstack
893         end,
894 })
895
896
897 minetest.register_node("default:pine_tree", {
898         description = "Pine Tree",
899         tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
900                 "default_pine_tree.png"},
901         paramtype2 = "facedir",
902         is_ground_content = false,
903         groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
904         sounds = default.node_sound_wood_defaults(),
905
906         on_place = minetest.rotate_node
907 })
908
909 minetest.register_node("default:pine_wood", {
910         description = "Pine Wood Planks",
911         paramtype2 = "facedir",
912         place_param2 = 0,
913         tiles = {"default_pine_wood.png"},
914         is_ground_content = false,
915         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
916         sounds = default.node_sound_wood_defaults(),
917 })
918
919 minetest.register_node("default:pine_needles",{
920         description = "Pine Needles",
921         drawtype = "allfaces_optional",
922         tiles = {"default_pine_needles.png"},
923         waving = 1,
924         paramtype = "light",
925         is_ground_content = false,
926         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
927         drop = {
928                 max_items = 1,
929                 items = {
930                         {items = {"default:pine_sapling"}, rarity = 20},
931                         {items = {"default:pine_needles"}}
932                 }
933         },
934         sounds = default.node_sound_leaves_defaults(),
935
936         after_place_node = default.after_place_leaves,
937 })
938
939 minetest.register_node("default:pine_sapling", {
940         description = "Pine Tree Sapling",
941         drawtype = "plantlike",
942         tiles = {"default_pine_sapling.png"},
943         inventory_image = "default_pine_sapling.png",
944         wield_image = "default_pine_sapling.png",
945         paramtype = "light",
946         sunlight_propagates = true,
947         walkable = false,
948         on_timer = default.grow_sapling,
949         selection_box = {
950                 type = "fixed",
951                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
952         },
953         groups = {snappy = 2, dig_immediate = 3, flammable = 3,
954                 attached_node = 1, sapling = 1},
955         sounds = default.node_sound_leaves_defaults(),
956
957         on_construct = function(pos)
958                 minetest.get_node_timer(pos):start(math.random(300, 1500))
959         end,
960
961         on_place = function(itemstack, placer, pointed_thing)
962                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
963                         "default:pine_sapling",
964                         -- minp, maxp to be checked, relative to sapling pos
965                         -- minp_relative.y = 1 because sapling pos has been checked
966                         {x = -2, y = 1, z = -2},
967                         {x = 2, y = 14, z = 2},
968                         -- maximum interval of interior volume check
969                         4)
970
971                 return itemstack
972         end,
973 })
974
975
976 minetest.register_node("default:acacia_tree", {
977         description = "Acacia Tree",
978         tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
979                 "default_acacia_tree.png"},
980         paramtype2 = "facedir",
981         is_ground_content = false,
982         groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
983         sounds = default.node_sound_wood_defaults(),
984
985         on_place = minetest.rotate_node
986 })
987
988 minetest.register_node("default:acacia_wood", {
989         description = "Acacia Wood Planks",
990         paramtype2 = "facedir",
991         place_param2 = 0,
992         tiles = {"default_acacia_wood.png"},
993         is_ground_content = false,
994         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
995         sounds = default.node_sound_wood_defaults(),
996 })
997
998 minetest.register_node("default:acacia_leaves", {
999         description = "Acacia Tree Leaves",
1000         drawtype = "allfaces_optional",
1001         tiles = {"default_acacia_leaves.png"},
1002         special_tiles = {"default_acacia_leaves_simple.png"},
1003         waving = 1,
1004         paramtype = "light",
1005         is_ground_content = false,
1006         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
1007         drop = {
1008                 max_items = 1,
1009                 items = {
1010                         {items = {"default:acacia_sapling"}, rarity = 20},
1011                         {items = {"default:acacia_leaves"}}
1012                 }
1013         },
1014         sounds = default.node_sound_leaves_defaults(),
1015
1016         after_place_node = default.after_place_leaves,
1017 })
1018
1019 minetest.register_node("default:acacia_sapling", {
1020         description = "Acacia Tree Sapling",
1021         drawtype = "plantlike",
1022         tiles = {"default_acacia_sapling.png"},
1023         inventory_image = "default_acacia_sapling.png",
1024         wield_image = "default_acacia_sapling.png",
1025         paramtype = "light",
1026         sunlight_propagates = true,
1027         walkable = false,
1028         on_timer = default.grow_sapling,
1029         selection_box = {
1030                 type = "fixed",
1031                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
1032         },
1033         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1034                 attached_node = 1, sapling = 1},
1035         sounds = default.node_sound_leaves_defaults(),
1036
1037         on_construct = function(pos)
1038                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1039         end,
1040
1041         on_place = function(itemstack, placer, pointed_thing)
1042                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1043                         "default:acacia_sapling",
1044                         -- minp, maxp to be checked, relative to sapling pos
1045                         -- minp_relative.y = 1 because sapling pos has been checked
1046                         {x = -4, y = 1, z = -4},
1047                         {x = 4, y = 7, z = 4},
1048                         -- maximum interval of interior volume check
1049                         4)
1050
1051                 return itemstack
1052         end,
1053 })
1054
1055 minetest.register_node("default:aspen_tree", {
1056         description = "Aspen Tree",
1057         tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png",
1058                 "default_aspen_tree.png"},
1059         paramtype2 = "facedir",
1060         is_ground_content = false,
1061         groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
1062         sounds = default.node_sound_wood_defaults(),
1063
1064         on_place = minetest.rotate_node
1065 })
1066
1067 minetest.register_node("default:aspen_wood", {
1068         description = "Aspen Wood Planks",
1069         paramtype2 = "facedir",
1070         place_param2 = 0,
1071         tiles = {"default_aspen_wood.png"},
1072         is_ground_content = false,
1073         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
1074         sounds = default.node_sound_wood_defaults(),
1075 })
1076
1077 minetest.register_node("default:aspen_leaves", {
1078         description = "Aspen Tree Leaves",
1079         drawtype = "allfaces_optional",
1080         tiles = {"default_aspen_leaves.png"},
1081         waving = 1,
1082         paramtype = "light",
1083         is_ground_content = false,
1084         groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
1085         drop = {
1086                 max_items = 1,
1087                 items = {
1088                         {items = {"default:aspen_sapling"}, rarity = 20},
1089                         {items = {"default:aspen_leaves"}}
1090                 }
1091         },
1092         sounds = default.node_sound_leaves_defaults(),
1093
1094         after_place_node = default.after_place_leaves,
1095 })
1096
1097 minetest.register_node("default:aspen_sapling", {
1098         description = "Aspen Tree Sapling",
1099         drawtype = "plantlike",
1100         tiles = {"default_aspen_sapling.png"},
1101         inventory_image = "default_aspen_sapling.png",
1102         wield_image = "default_aspen_sapling.png",
1103         paramtype = "light",
1104         sunlight_propagates = true,
1105         walkable = false,
1106         on_timer = default.grow_sapling,
1107         selection_box = {
1108                 type = "fixed",
1109                 fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16}
1110         },
1111         groups = {snappy = 2, dig_immediate = 3, flammable = 3,
1112                 attached_node = 1, sapling = 1},
1113         sounds = default.node_sound_leaves_defaults(),
1114
1115         on_construct = function(pos)
1116                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1117         end,
1118
1119         on_place = function(itemstack, placer, pointed_thing)
1120                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1121                         "default:aspen_sapling",
1122                         -- minp, maxp to be checked, relative to sapling pos
1123                         -- minp_relative.y = 1 because sapling pos has been checked
1124                         {x = -2, y = 1, z = -2},
1125                         {x = 2, y = 12, z = 2},
1126                         -- maximum interval of interior volume check
1127                         4)
1128
1129                 return itemstack
1130         end,
1131 })
1132
1133 --
1134 -- Ores
1135 --
1136
1137 minetest.register_node("default:stone_with_coal", {
1138         description = "Coal Ore",
1139         tiles = {"default_stone.png^default_mineral_coal.png"},
1140         groups = {cracky = 3},
1141         drop = 'default:coal_lump',
1142         sounds = default.node_sound_stone_defaults(),
1143 })
1144
1145 minetest.register_node("default:coalblock", {
1146         description = "Coal Block",
1147         tiles = {"default_coal_block.png"},
1148         is_ground_content = false,
1149         groups = {cracky = 3},
1150         sounds = default.node_sound_stone_defaults(),
1151 })
1152
1153
1154 minetest.register_node("default:stone_with_iron", {
1155         description = "Iron Ore",
1156         tiles = {"default_stone.png^default_mineral_iron.png"},
1157         groups = {cracky = 2},
1158         drop = 'default:iron_lump',
1159         sounds = default.node_sound_stone_defaults(),
1160 })
1161
1162 minetest.register_node("default:steelblock", {
1163         description = "Steel Block",
1164         tiles = {"default_steel_block.png"},
1165         is_ground_content = false,
1166         groups = {cracky = 1, level = 2},
1167         sounds = default.node_sound_metal_defaults(),
1168 })
1169
1170
1171 minetest.register_node("default:stone_with_copper", {
1172         description = "Copper Ore",
1173         tiles = {"default_stone.png^default_mineral_copper.png"},
1174         groups = {cracky = 2},
1175         drop = 'default:copper_lump',
1176         sounds = default.node_sound_stone_defaults(),
1177 })
1178
1179 minetest.register_node("default:copperblock", {
1180         description = "Copper Block",
1181         tiles = {"default_copper_block.png"},
1182         is_ground_content = false,
1183         groups = {cracky = 1, level = 2},
1184         sounds = default.node_sound_metal_defaults(),
1185 })
1186
1187
1188 minetest.register_node("default:stone_with_tin", {
1189         description = "Tin Ore",
1190         tiles = {"default_stone.png^default_mineral_tin.png"},
1191         groups = {cracky = 2},
1192         drop = "default:tin_lump",
1193         sounds = default.node_sound_stone_defaults(),
1194 })
1195
1196 minetest.register_node("default:tinblock", {
1197         description = "Tin Block",
1198         tiles = {"default_tin_block.png"},
1199         is_ground_content = false,
1200         groups = {cracky = 1, level = 2},
1201         sounds = default.node_sound_metal_defaults(),
1202 })
1203
1204
1205 minetest.register_node("default:bronzeblock", {
1206         description = "Bronze Block",
1207         tiles = {"default_bronze_block.png"},
1208         is_ground_content = false,
1209         groups = {cracky = 1, level = 2},
1210         sounds = default.node_sound_metal_defaults(),
1211 })
1212
1213
1214 minetest.register_node("default:stone_with_mese", {
1215         description = "Mese Ore",
1216         tiles = {"default_stone.png^default_mineral_mese.png"},
1217         groups = {cracky = 1},
1218         drop = "default:mese_crystal",
1219         sounds = default.node_sound_stone_defaults(),
1220 })
1221
1222 minetest.register_node("default:mese", {
1223         description = "Mese Block",
1224         tiles = {"default_mese_block.png"},
1225         paramtype = "light",
1226         groups = {cracky = 1, level = 2},
1227         sounds = default.node_sound_stone_defaults(),
1228         light_source = 3,
1229 })
1230
1231
1232 minetest.register_node("default:stone_with_gold", {
1233         description = "Gold Ore",
1234         tiles = {"default_stone.png^default_mineral_gold.png"},
1235         groups = {cracky = 2},
1236         drop = "default:gold_lump",
1237         sounds = default.node_sound_stone_defaults(),
1238 })
1239
1240 minetest.register_node("default:goldblock", {
1241         description = "Gold Block",
1242         tiles = {"default_gold_block.png"},
1243         is_ground_content = false,
1244         groups = {cracky = 1},
1245         sounds = default.node_sound_metal_defaults(),
1246 })
1247
1248
1249 minetest.register_node("default:stone_with_diamond", {
1250         description = "Diamond Ore",
1251         tiles = {"default_stone.png^default_mineral_diamond.png"},
1252         groups = {cracky = 1},
1253         drop = "default:diamond",
1254         sounds = default.node_sound_stone_defaults(),
1255 })
1256
1257 minetest.register_node("default:diamondblock", {
1258         description = "Diamond Block",
1259         tiles = {"default_diamond_block.png"},
1260         is_ground_content = false,
1261         groups = {cracky = 1, level = 3},
1262         sounds = default.node_sound_stone_defaults(),
1263 })
1264
1265 --
1266 -- Plantlife (non-cubic)
1267 --
1268
1269 minetest.register_node("default:cactus", {
1270         description = "Cactus",
1271         tiles = {"default_cactus_top.png", "default_cactus_top.png",
1272                 "default_cactus_side.png"},
1273         paramtype2 = "facedir",
1274         groups = {choppy = 3},
1275         sounds = default.node_sound_wood_defaults(),
1276         on_place = minetest.rotate_node,
1277 })
1278
1279 minetest.register_node("default:papyrus", {
1280         description = "Papyrus",
1281         drawtype = "plantlike",
1282         tiles = {"default_papyrus.png"},
1283         inventory_image = "default_papyrus.png",
1284         wield_image = "default_papyrus.png",
1285         paramtype = "light",
1286         sunlight_propagates = true,
1287         walkable = false,
1288         selection_box = {
1289                 type = "fixed",
1290                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
1291         },
1292         groups = {snappy = 3, flammable = 2},
1293         sounds = default.node_sound_leaves_defaults(),
1294
1295         after_dig_node = function(pos, node, metadata, digger)
1296                 default.dig_up(pos, node, digger)
1297         end,
1298 })
1299
1300 minetest.register_node("default:dry_shrub", {
1301         description = "Dry Shrub",
1302         drawtype = "plantlike",
1303         waving = 1,
1304         tiles = {"default_dry_shrub.png"},
1305         inventory_image = "default_dry_shrub.png",
1306         wield_image = "default_dry_shrub.png",
1307         paramtype = "light",
1308         paramtype2 = "meshoptions",
1309         place_param2 = 4,
1310         sunlight_propagates = true,
1311         walkable = false,
1312         buildable_to = true,
1313         groups = {snappy = 3, flammable = 3, attached_node = 1},
1314         sounds = default.node_sound_leaves_defaults(),
1315         selection_box = {
1316                 type = "fixed",
1317                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16},
1318         },
1319 })
1320
1321 minetest.register_node("default:junglegrass", {
1322         description = "Jungle Grass",
1323         drawtype = "plantlike",
1324         waving = 1,
1325         visual_scale = 1.69,
1326         tiles = {"default_junglegrass.png"},
1327         inventory_image = "default_junglegrass.png",
1328         wield_image = "default_junglegrass.png",
1329         paramtype = "light",
1330         sunlight_propagates = true,
1331         walkable = false,
1332         buildable_to = true,
1333         groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1},
1334         sounds = default.node_sound_leaves_defaults(),
1335         selection_box = {
1336                 type = "fixed",
1337                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
1338         },
1339 })
1340
1341
1342 minetest.register_node("default:grass_1", {
1343         description = "Grass",
1344         drawtype = "plantlike",
1345         waving = 1,
1346         tiles = {"default_grass_1.png"},
1347         -- Use texture of a taller grass stage in inventory
1348         inventory_image = "default_grass_3.png",
1349         wield_image = "default_grass_3.png",
1350         paramtype = "light",
1351         sunlight_propagates = true,
1352         walkable = false,
1353         buildable_to = true,
1354         groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
1355         sounds = default.node_sound_leaves_defaults(),
1356         selection_box = {
1357                 type = "fixed",
1358                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
1359         },
1360
1361         on_place = function(itemstack, placer, pointed_thing)
1362                 -- place a random grass node
1363                 local stack = ItemStack("default:grass_" .. math.random(1,5))
1364                 local ret = minetest.item_place(stack, placer, pointed_thing)
1365                 return ItemStack("default:grass_1 " ..
1366                         itemstack:get_count() - (1 - ret:get_count()))
1367         end,
1368 })
1369
1370 for i = 2, 5 do
1371         minetest.register_node("default:grass_" .. i, {
1372                 description = "Grass",
1373                 drawtype = "plantlike",
1374                 waving = 1,
1375                 tiles = {"default_grass_" .. i .. ".png"},
1376                 inventory_image = "default_grass_" .. i .. ".png",
1377                 wield_image = "default_grass_" .. i .. ".png",
1378                 paramtype = "light",
1379                 sunlight_propagates = true,
1380                 walkable = false,
1381                 buildable_to = true,
1382                 drop = "default:grass_1",
1383                 groups = {snappy = 3, flora = 1, attached_node = 1,
1384                         not_in_creative_inventory = 1, grass = 1, flammable = 1},
1385                 sounds = default.node_sound_leaves_defaults(),
1386                 selection_box = {
1387                         type = "fixed",
1388                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1389                 },
1390         })
1391 end
1392
1393
1394 minetest.register_node("default:dry_grass_1", {
1395         description = "Dry Grass",
1396         drawtype = "plantlike",
1397         waving = 1,
1398         tiles = {"default_dry_grass_1.png"},
1399         inventory_image = "default_dry_grass_3.png",
1400         wield_image = "default_dry_grass_3.png",
1401         paramtype = "light",
1402         sunlight_propagates = true,
1403         walkable = false,
1404         buildable_to = true,
1405         groups = {snappy = 3, flammable = 3, flora = 1,
1406                 attached_node = 1, dry_grass = 1},
1407         sounds = default.node_sound_leaves_defaults(),
1408         selection_box = {
1409                 type = "fixed",
1410                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1411         },
1412
1413         on_place = function(itemstack, placer, pointed_thing)
1414                 -- place a random dry grass node
1415                 local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
1416                 local ret = minetest.item_place(stack, placer, pointed_thing)
1417                 return ItemStack("default:dry_grass_1 " ..
1418                         itemstack:get_count() - (1 - ret:get_count()))
1419         end,
1420 })
1421
1422 for i = 2, 5 do
1423         minetest.register_node("default:dry_grass_" .. i, {
1424                 description = "Dry Grass",
1425                 drawtype = "plantlike",
1426                 waving = 1,
1427                 tiles = {"default_dry_grass_" .. i .. ".png"},
1428                 inventory_image = "default_dry_grass_" .. i .. ".png",
1429                 wield_image = "default_dry_grass_" .. i .. ".png",
1430                 paramtype = "light",
1431                 sunlight_propagates = true,
1432                 walkable = false,
1433                 buildable_to = true,
1434                 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1435                         not_in_creative_inventory=1, dry_grass = 1},
1436                 drop = "default:dry_grass_1",
1437                 sounds = default.node_sound_leaves_defaults(),
1438                 selection_box = {
1439                         type = "fixed",
1440                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16},
1441                 },
1442         })
1443 end
1444
1445
1446 minetest.register_node("default:fern_1", {
1447         description = "Fern",
1448         drawtype = "plantlike",
1449         waving = 1,
1450         tiles = {"default_fern_1.png"},
1451         inventory_image = "default_fern_1.png",
1452         wield_image = "default_fern_1.png",
1453         paramtype = "light",
1454         sunlight_propagates = true,
1455         walkable = false,
1456         buildable_to = true,
1457         groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
1458         sounds = default.node_sound_leaves_defaults(),
1459         selection_box = {
1460                 type = "fixed",
1461                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1462         },
1463
1464         on_place = function(itemstack, placer, pointed_thing)
1465                 -- place a random fern node
1466                 local stack = ItemStack("default:fern_" .. math.random(1, 3))
1467                 local ret = minetest.item_place(stack, placer, pointed_thing)
1468                 return ItemStack("default:fern_1 " ..
1469                         itemstack:get_count() - (1 - ret:get_count()))
1470         end,
1471 })
1472
1473 for i = 2, 3 do
1474         minetest.register_node("default:fern_" .. i, {
1475                 description = "Fern",
1476                 drawtype = "plantlike",
1477                 waving = 1,
1478                 visual_scale = 2,
1479                 tiles = {"default_fern_" .. i .. ".png"},
1480                 inventory_image = "default_fern_" .. i .. ".png",
1481                 wield_image = "default_fern_" .. i .. ".png",
1482                 paramtype = "light",
1483                 sunlight_propagates = true,
1484                 walkable = false,
1485                 buildable_to = true,
1486                 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1487                         not_in_creative_inventory=1},
1488                 drop = "default:fern_1",
1489                 sounds = default.node_sound_leaves_defaults(),
1490                 selection_box = {
1491                         type = "fixed",
1492                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1493                 },
1494         })
1495 end
1496
1497
1498 minetest.register_node("default:marram_grass_1", {
1499         description = "Marram Grass",
1500         drawtype = "plantlike",
1501         waving = 1,
1502         tiles = {"default_marram_grass_1.png"},
1503         inventory_image = "default_marram_grass_1.png",
1504         wield_image = "default_marram_grass_1.png",
1505         paramtype = "light",
1506         sunlight_propagates = true,
1507         walkable = false,
1508         buildable_to = true,
1509         groups = {snappy = 3, flammable = 3, attached_node = 1},
1510         sounds = default.node_sound_leaves_defaults(),
1511         selection_box = {
1512                 type = "fixed",
1513                 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1514         },
1515
1516         on_place = function(itemstack, placer, pointed_thing)
1517                 -- place a random marram grass node
1518                 local stack = ItemStack("default:marram_grass_" .. math.random(1, 3))
1519                 local ret = minetest.item_place(stack, placer, pointed_thing)
1520                 return ItemStack("default:marram_grass_1 " ..
1521                         itemstack:get_count() - (1 - ret:get_count()))
1522         end,
1523 })
1524
1525 for i = 2, 3 do
1526         minetest.register_node("default:marram_grass_" .. i, {
1527                 description = "Marram Grass",
1528                 drawtype = "plantlike",
1529                 waving = 1,
1530                 tiles = {"default_marram_grass_" .. i .. ".png"},
1531                 inventory_image = "default_marram_grass_" .. i .. ".png",
1532                 wield_image = "default_marram_grass_" .. i .. ".png",
1533                 paramtype = "light",
1534                 sunlight_propagates = true,
1535                 walkable = false,
1536                 buildable_to = true,
1537                 groups = {snappy = 3, flammable = 3, attached_node = 1,
1538                         not_in_creative_inventory=1},
1539                 drop = "default:marram_grass_1",
1540                 sounds = default.node_sound_leaves_defaults(),
1541                 selection_box = {
1542                         type = "fixed",
1543                         fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1544                 },
1545         })
1546 end
1547
1548
1549 minetest.register_node("default:bush_stem", {
1550         description = "Bush Stem",
1551         drawtype = "plantlike",
1552         visual_scale = 1.41,
1553         tiles = {"default_bush_stem.png"},
1554         inventory_image = "default_bush_stem.png",
1555         wield_image = "default_bush_stem.png",
1556         paramtype = "light",
1557         sunlight_propagates = true,
1558         groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1559         sounds = default.node_sound_wood_defaults(),
1560         selection_box = {
1561                 type = "fixed",
1562                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1563         },
1564 })
1565
1566 minetest.register_node("default:bush_leaves", {
1567         description = "Bush Leaves",
1568         drawtype = "allfaces_optional",
1569         waving = 1,
1570         tiles = {"default_leaves_simple.png"},
1571         paramtype = "light",
1572         groups = {snappy = 3, flammable = 2, leaves = 1},
1573         drop = {
1574                 max_items = 1,
1575                 items = {
1576                         {items = {"default:bush_sapling"}, rarity = 5},
1577                         {items = {"default:bush_leaves"}}
1578                 }
1579         },
1580         sounds = default.node_sound_leaves_defaults(),
1581
1582         after_place_node = default.after_place_leaves,
1583 })
1584
1585 minetest.register_node("default:bush_sapling", {
1586         description = "Bush Sapling",
1587         drawtype = "plantlike",
1588         tiles = {"default_bush_sapling.png"},
1589         inventory_image = "default_bush_sapling.png",
1590         wield_image = "default_bush_sapling.png",
1591         paramtype = "light",
1592         sunlight_propagates = true,
1593         walkable = false,
1594         on_timer = default.grow_sapling,
1595         selection_box = {
1596                 type = "fixed",
1597                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1598         },
1599         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1600                 attached_node = 1, sapling = 1},
1601         sounds = default.node_sound_leaves_defaults(),
1602
1603         on_construct = function(pos)
1604                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1605         end,
1606
1607         on_place = function(itemstack, placer, pointed_thing)
1608                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1609                         "default:bush_sapling",
1610                         -- minp, maxp to be checked, relative to sapling pos
1611                         {x = -1, y = 0, z = -1},
1612                         {x = 1, y = 1, z = 1},
1613                         -- maximum interval of interior volume check
1614                         2)
1615
1616                 return itemstack
1617         end,
1618 })
1619
1620 minetest.register_node("default:blueberry_bush_leaves_with_berries", {
1621         description = "Blueberry Bush Leaves with Berries",
1622         drawtype = "allfaces_optional",
1623         waving = 1,
1624         tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"},
1625         paramtype = "light",
1626         groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 3},
1627         drop = "default:blueberries",
1628         sounds = default.node_sound_leaves_defaults(),
1629         node_dig_prediction = "default:blueberry_bush_leaves",
1630
1631         after_dig_node = function(pos, oldnode, oldmetadata, digger)
1632                 minetest.set_node(pos, {name = "default:blueberry_bush_leaves"})
1633                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1634         end,
1635 })
1636
1637 minetest.register_node("default:blueberry_bush_leaves", {
1638         description = "Blueberry Bush Leaves",
1639         drawtype = "allfaces_optional",
1640         waving = 1,
1641         tiles = {"default_blueberry_bush_leaves.png"},
1642         paramtype = "light",
1643         groups = {snappy = 3, flammable = 2, leaves = 1},
1644         drop = {
1645                 max_items = 1,
1646                 items = {
1647                         {items = {"default:blueberry_bush_sapling"}, rarity = 5},
1648                         {items = {"default:blueberry_bush_leaves"}}
1649                 }
1650         },
1651         sounds = default.node_sound_leaves_defaults(),
1652
1653         on_timer = function(pos, elapsed)
1654                 if minetest.get_node_light(pos) < 11 then
1655                         minetest.get_node_timer(pos):start(200)
1656                 else
1657                         minetest.set_node(pos, {name = "default:blueberry_bush_leaves_with_berries"})
1658                 end
1659         end,
1660
1661         after_place_node = default.after_place_leaves,
1662 })
1663
1664 minetest.register_node("default:blueberry_bush_sapling", {
1665         description = "Blueberry Bush Sapling",
1666         drawtype = "plantlike",
1667         tiles = {"default_blueberry_bush_sapling.png"},
1668         inventory_image = "default_blueberry_bush_sapling.png",
1669         wield_image = "default_blueberry_bush_sapling.png",
1670         paramtype = "light",
1671         sunlight_propagates = true,
1672         walkable = false,
1673         on_timer = default.grow_sapling,
1674         selection_box = {
1675                 type = "fixed",
1676                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1677         },
1678         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1679                 attached_node = 1, sapling = 1},
1680         sounds = default.node_sound_leaves_defaults(),
1681
1682         on_construct = function(pos)
1683                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1684         end,
1685
1686         on_place = function(itemstack, placer, pointed_thing)
1687                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1688                         "default:blueberry_bush_sapling",
1689                         -- minp, maxp to be checked, relative to sapling pos
1690                         {x = -1, y = 0, z = -1},
1691                         {x = 1, y = 1, z = 1},
1692                         -- maximum interval of interior volume check
1693                         2)
1694
1695                 return itemstack
1696         end,
1697 })
1698
1699 minetest.register_node("default:acacia_bush_stem", {
1700         description = "Acacia Bush Stem",
1701         drawtype = "plantlike",
1702         visual_scale = 1.41,
1703         tiles = {"default_acacia_bush_stem.png"},
1704         inventory_image = "default_acacia_bush_stem.png",
1705         wield_image = "default_acacia_bush_stem.png",
1706         paramtype = "light",
1707         sunlight_propagates = true,
1708         groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1709         sounds = default.node_sound_wood_defaults(),
1710         selection_box = {
1711                 type = "fixed",
1712                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1713         },
1714 })
1715
1716 minetest.register_node("default:acacia_bush_leaves", {
1717         description = "Acacia Bush Leaves",
1718         drawtype = "allfaces_optional",
1719         waving = 1,
1720         tiles = {"default_acacia_leaves_simple.png"},
1721         paramtype = "light",
1722         groups = {snappy = 3, flammable = 2, leaves = 1},
1723         drop = {
1724                 max_items = 1,
1725                 items = {
1726                         {items = {"default:acacia_bush_sapling"}, rarity = 5},
1727                         {items = {"default:acacia_bush_leaves"}}
1728                 }
1729         },
1730         sounds = default.node_sound_leaves_defaults(),
1731
1732         after_place_node = default.after_place_leaves,
1733 })
1734
1735 minetest.register_node("default:acacia_bush_sapling", {
1736         description = "Acacia Bush Sapling",
1737         drawtype = "plantlike",
1738         tiles = {"default_acacia_bush_sapling.png"},
1739         inventory_image = "default_acacia_bush_sapling.png",
1740         wield_image = "default_acacia_bush_sapling.png",
1741         paramtype = "light",
1742         sunlight_propagates = true,
1743         walkable = false,
1744         on_timer = default.grow_sapling,
1745         selection_box = {
1746                 type = "fixed",
1747                 fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16}
1748         },
1749         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1750                 attached_node = 1, sapling = 1},
1751         sounds = default.node_sound_leaves_defaults(),
1752
1753         on_construct = function(pos)
1754                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1755         end,
1756
1757         on_place = function(itemstack, placer, pointed_thing)
1758                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1759                         "default:acacia_bush_sapling",
1760                         -- minp, maxp to be checked, relative to sapling pos
1761                         {x = -1, y = 0, z = -1},
1762                         {x = 1, y = 1, z = 1},
1763                         -- maximum interval of interior volume check
1764                         2)
1765
1766                 return itemstack
1767         end,
1768 })
1769
1770 minetest.register_node("default:pine_bush_stem", {
1771         description = "Pine Bush Stem",
1772         drawtype = "plantlike",
1773         visual_scale = 1.41,
1774         tiles = {"default_pine_bush_stem.png"},
1775         inventory_image = "default_pine_bush_stem.png",
1776         wield_image = "default_pine_bush_stem.png",
1777         paramtype = "light",
1778         sunlight_propagates = true,
1779         groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1780         sounds = default.node_sound_wood_defaults(),
1781         selection_box = {
1782                 type = "fixed",
1783                 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1784         },
1785 })
1786
1787 minetest.register_node("default:pine_bush_needles", {
1788         description = "Pine Bush Needles",
1789         drawtype = "allfaces_optional",
1790         waving = 1,
1791         tiles = {"default_pine_needles.png"},
1792         paramtype = "light",
1793         groups = {snappy = 3, flammable = 2, leaves = 1},
1794         drop = {
1795                 max_items = 1,
1796                 items = {
1797                         {items = {"default:pine_bush_sapling"}, rarity = 5},
1798                         {items = {"default:pine_bush_needles"}}
1799                 }
1800         },
1801         sounds = default.node_sound_leaves_defaults(),
1802
1803         after_place_node = default.after_place_leaves,
1804 })
1805
1806 minetest.register_node("default:pine_bush_sapling", {
1807         description = "Pine Bush Sapling",
1808         drawtype = "plantlike",
1809         tiles = {"default_pine_bush_sapling.png"},
1810         inventory_image = "default_pine_bush_sapling.png",
1811         wield_image = "default_pine_bush_sapling.png",
1812         paramtype = "light",
1813         sunlight_propagates = true,
1814         walkable = false,
1815         on_timer = default.grow_sapling,
1816         selection_box = {
1817                 type = "fixed",
1818                 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1819         },
1820         groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1821                 attached_node = 1, sapling = 1},
1822         sounds = default.node_sound_leaves_defaults(),
1823
1824         on_construct = function(pos)
1825                 minetest.get_node_timer(pos):start(math.random(300, 1500))
1826         end,
1827
1828         on_place = function(itemstack, placer, pointed_thing)
1829                 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1830                         "default:pine_bush_sapling",
1831                         -- minp, maxp to be checked, relative to sapling pos
1832                         {x = -1, y = 0, z = -1},
1833                         {x = 1, y = 1, z = 1},
1834                         -- maximum interval of interior volume check
1835                         2)
1836
1837                 return itemstack
1838         end,
1839 })
1840
1841 minetest.register_node("default:sand_with_kelp", {
1842         description = "Kelp",
1843         drawtype = "plantlike_rooted",
1844         waving = 1,
1845         tiles = {"default_sand.png"},
1846         special_tiles = {{name = "default_kelp.png", tileable_vertical = true}},
1847         inventory_image = "default_kelp.png",
1848         paramtype = "light",
1849         paramtype2 = "leveled",
1850         groups = {snappy = 3},
1851         selection_box = {
1852                 type = "fixed",
1853                 fixed = {
1854                                 {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
1855                                 {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16},
1856                 },
1857         },
1858         node_dig_prediction = "default:sand",
1859         node_placement_prediction = "",
1860
1861         on_place = function(itemstack, placer, pointed_thing)
1862                 -- Call on_rightclick if the pointed node defines it
1863                 if pointed_thing.type == "node" and placer and
1864                                 not placer:get_player_control().sneak then
1865                         local node_ptu = minetest.get_node(pointed_thing.under)
1866                         local def_ptu = minetest.registered_nodes[node_ptu.name]
1867                         if def_ptu and def_ptu.on_rightclick then
1868                                 return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer,
1869                                         itemstack, pointed_thing)
1870                         end
1871                 end
1872
1873                 local pos = pointed_thing.under
1874                 if minetest.get_node(pos).name ~= "default:sand" then
1875                         return itemstack
1876                 end
1877
1878                 local height = math.random(4, 6)
1879                 local pos_top = {x = pos.x, y = pos.y + height, z = pos.z}
1880                 local node_top = minetest.get_node(pos_top)
1881                 local def_top = minetest.registered_nodes[node_top.name]
1882                 local player_name = placer:get_player_name()
1883
1884                 if def_top and def_top.liquidtype == "source" and
1885                                 minetest.get_item_group(node_top.name, "water") > 0 then
1886                         if not minetest.is_protected(pos, player_name) and
1887                                         not minetest.is_protected(pos_top, player_name) then
1888                                 minetest.set_node(pos, {name = "default:sand_with_kelp",
1889                                         param2 = height * 16})
1890                                 if not (creative and creative.is_enabled_for
1891                                                 and creative.is_enabled_for(player_name)) then
1892                                         itemstack:take_item()
1893                                 end
1894                         else
1895                                 minetest.chat_send_player(player_name, "Node is protected")
1896                                 minetest.record_protection_violation(pos, player_name)
1897                         end
1898                 end
1899
1900                 return itemstack
1901         end,
1902
1903         after_destruct  = function(pos, oldnode)
1904                 minetest.set_node(pos, {name = "default:sand"})
1905         end
1906 })
1907
1908
1909 --
1910 -- Corals
1911 --
1912
1913 minetest.register_node("default:coral_brown", {
1914         description = "Brown Coral",
1915         tiles = {"default_coral_brown.png"},
1916         groups = {cracky = 3},
1917         drop = "default:coral_skeleton",
1918         sounds = default.node_sound_stone_defaults(),
1919 })
1920
1921 minetest.register_node("default:coral_orange", {
1922         description = "Orange Coral",
1923         tiles = {"default_coral_orange.png"},
1924         groups = {cracky = 3},
1925         drop = "default:coral_skeleton",
1926         sounds = default.node_sound_stone_defaults(),
1927 })
1928
1929 minetest.register_node("default:coral_skeleton", {
1930         description = "Coral Skeleton",
1931         tiles = {"default_coral_skeleton.png"},
1932         groups = {cracky = 3},
1933         sounds = default.node_sound_stone_defaults(),
1934 })
1935
1936
1937 --
1938 -- Liquids
1939 --
1940
1941 minetest.register_node("default:water_source", {
1942         description = "Water Source",
1943         drawtype = "liquid",
1944         tiles = {
1945                 {
1946                         name = "default_water_source_animated.png",
1947                         backface_culling = false,
1948                         animation = {
1949                                 type = "vertical_frames",
1950                                 aspect_w = 16,
1951                                 aspect_h = 16,
1952                                 length = 2.0,
1953                         },
1954                 },
1955                 {
1956                         name = "default_water_source_animated.png",
1957                         backface_culling = true,
1958                         animation = {
1959                                 type = "vertical_frames",
1960                                 aspect_w = 16,
1961                                 aspect_h = 16,
1962                                 length = 2.0,
1963                         },
1964                 },
1965         },
1966         alpha = 160,
1967         paramtype = "light",
1968         walkable = false,
1969         pointable = false,
1970         diggable = false,
1971         buildable_to = true,
1972         is_ground_content = false,
1973         drop = "",
1974         drowning = 1,
1975         liquidtype = "source",
1976         liquid_alternative_flowing = "default:water_flowing",
1977         liquid_alternative_source = "default:water_source",
1978         liquid_viscosity = 1,
1979         post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1980         groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
1981         sounds = default.node_sound_water_defaults(),
1982 })
1983
1984 minetest.register_node("default:water_flowing", {
1985         description = "Flowing Water",
1986         drawtype = "flowingliquid",
1987         tiles = {"default_water.png"},
1988         special_tiles = {
1989                 {
1990                         name = "default_water_flowing_animated.png",
1991                         backface_culling = false,
1992                         animation = {
1993                                 type = "vertical_frames",
1994                                 aspect_w = 16,
1995                                 aspect_h = 16,
1996                                 length = 0.8,
1997                         },
1998                 },
1999                 {
2000                         name = "default_water_flowing_animated.png",
2001                         backface_culling = true,
2002                         animation = {
2003                                 type = "vertical_frames",
2004                                 aspect_w = 16,
2005                                 aspect_h = 16,
2006                                 length = 0.8,
2007                         },
2008                 },
2009         },
2010         alpha = 160,
2011         paramtype = "light",
2012         paramtype2 = "flowingliquid",
2013         walkable = false,
2014         pointable = false,
2015         diggable = false,
2016         buildable_to = true,
2017         is_ground_content = false,
2018         drop = "",
2019         drowning = 1,
2020         liquidtype = "flowing",
2021         liquid_alternative_flowing = "default:water_flowing",
2022         liquid_alternative_source = "default:water_source",
2023         liquid_viscosity = 1,
2024         post_effect_color = {a = 103, r = 30, g = 60, b = 90},
2025         groups = {water = 3, liquid = 3, puts_out_fire = 1,
2026                 not_in_creative_inventory = 1, cools_lava = 1},
2027         sounds = default.node_sound_water_defaults(),
2028 })
2029
2030
2031 minetest.register_node("default:river_water_source", {
2032         description = "River Water Source",
2033         drawtype = "liquid",
2034         tiles = {
2035                 {
2036                         name = "default_river_water_source_animated.png",
2037                         backface_culling = false,
2038                         animation = {
2039                                 type = "vertical_frames",
2040                                 aspect_w = 16,
2041                                 aspect_h = 16,
2042                                 length = 2.0,
2043                         },
2044                 },
2045                 {
2046                         name = "default_river_water_source_animated.png",
2047                         backface_culling = true,
2048                         animation = {
2049                                 type = "vertical_frames",
2050                                 aspect_w = 16,
2051                                 aspect_h = 16,
2052                                 length = 2.0,
2053                         },
2054                 },
2055         },
2056         alpha = 160,
2057         paramtype = "light",
2058         walkable = false,
2059         pointable = false,
2060         diggable = false,
2061         buildable_to = true,
2062         is_ground_content = false,
2063         drop = "",
2064         drowning = 1,
2065         liquidtype = "source",
2066         liquid_alternative_flowing = "default:river_water_flowing",
2067         liquid_alternative_source = "default:river_water_source",
2068         liquid_viscosity = 1,
2069         -- Not renewable to avoid horizontal spread of water sources in sloping
2070         -- rivers that can cause water to overflow riverbanks and cause floods.
2071         -- River water source is instead made renewable by the 'force renew'
2072         -- option used in the 'bucket' mod by the river water bucket.
2073         liquid_renewable = false,
2074         liquid_range = 2,
2075         post_effect_color = {a = 103, r = 30, g = 76, b = 90},
2076         groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
2077         sounds = default.node_sound_water_defaults(),
2078 })
2079
2080 minetest.register_node("default:river_water_flowing", {
2081         description = "Flowing River Water",
2082         drawtype = "flowingliquid",
2083         tiles = {"default_river_water.png"},
2084         special_tiles = {
2085                 {
2086                         name = "default_river_water_flowing_animated.png",
2087                         backface_culling = false,
2088                         animation = {
2089                                 type = "vertical_frames",
2090                                 aspect_w = 16,
2091                                 aspect_h = 16,
2092                                 length = 0.8,
2093                         },
2094                 },
2095                 {
2096                         name = "default_river_water_flowing_animated.png",
2097                         backface_culling = true,
2098                         animation = {
2099                                 type = "vertical_frames",
2100                                 aspect_w = 16,
2101                                 aspect_h = 16,
2102                                 length = 0.8,
2103                         },
2104                 },
2105         },
2106         alpha = 160,
2107         paramtype = "light",
2108         paramtype2 = "flowingliquid",
2109         walkable = false,
2110         pointable = false,
2111         diggable = false,
2112         buildable_to = true,
2113         is_ground_content = false,
2114         drop = "",
2115         drowning = 1,
2116         liquidtype = "flowing",
2117         liquid_alternative_flowing = "default:river_water_flowing",
2118         liquid_alternative_source = "default:river_water_source",
2119         liquid_viscosity = 1,
2120         liquid_renewable = false,
2121         liquid_range = 2,
2122         post_effect_color = {a = 103, r = 30, g = 76, b = 90},
2123         groups = {water = 3, liquid = 3, puts_out_fire = 1,
2124                 not_in_creative_inventory = 1, cools_lava = 1},
2125         sounds = default.node_sound_water_defaults(),
2126 })
2127
2128
2129 minetest.register_node("default:lava_source", {
2130         description = "Lava Source",
2131         drawtype = "liquid",
2132         tiles = {
2133                 {
2134                         name = "default_lava_source_animated.png",
2135                         backface_culling = false,
2136                         animation = {
2137                                 type = "vertical_frames",
2138                                 aspect_w = 16,
2139                                 aspect_h = 16,
2140                                 length = 3.0,
2141                         },
2142                 },
2143                 {
2144                         name = "default_lava_source_animated.png",
2145                         backface_culling = true,
2146                         animation = {
2147                                 type = "vertical_frames",
2148                                 aspect_w = 16,
2149                                 aspect_h = 16,
2150                                 length = 3.0,
2151                         },
2152                 },
2153         },
2154         paramtype = "light",
2155         light_source = default.LIGHT_MAX - 1,
2156         walkable = false,
2157         pointable = false,
2158         diggable = false,
2159         buildable_to = true,
2160         is_ground_content = false,
2161         drop = "",
2162         drowning = 1,
2163         liquidtype = "source",
2164         liquid_alternative_flowing = "default:lava_flowing",
2165         liquid_alternative_source = "default:lava_source",
2166         liquid_viscosity = 7,
2167         liquid_renewable = false,
2168         damage_per_second = 4 * 2,
2169         post_effect_color = {a = 191, r = 255, g = 64, b = 0},
2170         groups = {lava = 3, liquid = 2, igniter = 1},
2171 })
2172
2173 minetest.register_node("default:lava_flowing", {
2174         description = "Flowing Lava",
2175         drawtype = "flowingliquid",
2176         tiles = {"default_lava.png"},
2177         special_tiles = {
2178                 {
2179                         name = "default_lava_flowing_animated.png",
2180                         backface_culling = false,
2181                         animation = {
2182                                 type = "vertical_frames",
2183                                 aspect_w = 16,
2184                                 aspect_h = 16,
2185                                 length = 3.3,
2186                         },
2187                 },
2188                 {
2189                         name = "default_lava_flowing_animated.png",
2190                         backface_culling = true,
2191                         animation = {
2192                                 type = "vertical_frames",
2193                                 aspect_w = 16,
2194                                 aspect_h = 16,
2195                                 length = 3.3,
2196                         },
2197                 },
2198         },
2199         paramtype = "light",
2200         paramtype2 = "flowingliquid",
2201         light_source = default.LIGHT_MAX - 1,
2202         walkable = false,
2203         pointable = false,
2204         diggable = false,
2205         buildable_to = true,
2206         is_ground_content = false,
2207         drop = "",
2208         drowning = 1,
2209         liquidtype = "flowing",
2210         liquid_alternative_flowing = "default:lava_flowing",
2211         liquid_alternative_source = "default:lava_source",
2212         liquid_viscosity = 7,
2213         liquid_renewable = false,
2214         damage_per_second = 4 * 2,
2215         post_effect_color = {a = 191, r = 255, g = 64, b = 0},
2216         groups = {lava = 3, liquid = 2, igniter = 1,
2217                 not_in_creative_inventory = 1},
2218 })
2219
2220 --
2221 -- Tools / "Advanced" crafting / Non-"natural"
2222 --
2223
2224 local bookshelf_formspec =
2225         "size[8,7;]" ..
2226         default.gui_bg ..
2227         default.gui_bg_img ..
2228         default.gui_slots ..
2229         "list[context;books;0,0.3;8,2;]" ..
2230         "list[current_player;main;0,2.85;8,1;]" ..
2231         "list[current_player;main;0,4.08;8,3;8]" ..
2232         "listring[context;books]" ..
2233         "listring[current_player;main]" ..
2234         default.get_hotbar_bg(0,2.85)
2235
2236 local function update_bookshelf(pos)
2237         local meta = minetest.get_meta(pos)
2238         local inv = meta:get_inventory()
2239         local invlist = inv:get_list("books")
2240
2241         local formspec = bookshelf_formspec
2242         -- Inventory slots overlay
2243         local bx, by = 0, 0.3
2244         local n_written, n_empty = 0, 0
2245         for i = 1, 16 do
2246                 if i == 9 then
2247                         bx = 0
2248                         by = by + 1
2249                 end
2250                 local stack = invlist[i]
2251                 if stack:is_empty() then
2252                         formspec = formspec ..
2253                                 "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"
2254                 else
2255                         local metatable = stack:get_meta():to_table() or {}
2256                         if metatable.fields and metatable.fields.text then
2257                                 n_written = n_written + stack:get_count()
2258                         else
2259                                 n_empty = n_empty + stack:get_count()
2260                         end
2261                 end
2262                 bx = bx + 1
2263         end
2264         meta:set_string("formspec", formspec)
2265         if n_written + n_empty == 0 then
2266                 meta:set_string("infotext", "Empty Bookshelf")
2267         else
2268                 meta:set_string("infotext", "Bookshelf (" .. n_written ..
2269                         " written, " .. n_empty .. " empty books)")
2270         end
2271 end
2272
2273 minetest.register_node("default:bookshelf", {
2274         description = "Bookshelf",
2275         tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
2276                 "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"},
2277         paramtype2 = "facedir",
2278         is_ground_content = false,
2279         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2280         sounds = default.node_sound_wood_defaults(),
2281
2282         on_construct = function(pos)
2283                 local meta = minetest.get_meta(pos)
2284                 local inv = meta:get_inventory()
2285                 inv:set_size("books", 8 * 2)
2286                 update_bookshelf(pos)
2287         end,
2288         can_dig = function(pos,player)
2289                 local inv = minetest.get_meta(pos):get_inventory()
2290                 return inv:is_empty("books")
2291         end,
2292         allow_metadata_inventory_put = function(pos, listname, index, stack)
2293                 if minetest.get_item_group(stack:get_name(), "book") ~= 0 then
2294                         return stack:get_count()
2295                 end
2296                 return 0
2297         end,
2298         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
2299                 minetest.log("action", player:get_player_name() ..
2300                         " moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
2301                 update_bookshelf(pos)
2302         end,
2303         on_metadata_inventory_put = function(pos, listname, index, stack, player)
2304                 minetest.log("action", player:get_player_name() ..
2305                         " puts stuff to bookshelf at " .. minetest.pos_to_string(pos))
2306                 update_bookshelf(pos)
2307         end,
2308         on_metadata_inventory_take = function(pos, listname, index, stack, player)
2309                 minetest.log("action", player:get_player_name() ..
2310                         " takes stuff from bookshelf at " .. minetest.pos_to_string(pos))
2311                 update_bookshelf(pos)
2312         end,
2313         on_blast = function(pos)
2314                 local drops = {}
2315                 default.get_inventory_drops(pos, "books", drops)
2316                 drops[#drops+1] = "default:bookshelf"
2317                 minetest.remove_node(pos)
2318                 return drops
2319         end,
2320 })
2321
2322 local function register_sign(material, desc, def)
2323         minetest.register_node("default:sign_wall_" .. material, {
2324                 description = desc .. " Sign",
2325                 drawtype = "nodebox",
2326                 tiles = {"default_sign_wall_" .. material .. ".png"},
2327                 inventory_image = "default_sign_" .. material .. ".png",
2328                 wield_image = "default_sign_" .. material .. ".png",
2329                 paramtype = "light",
2330                 paramtype2 = "wallmounted",
2331                 sunlight_propagates = true,
2332                 is_ground_content = false,
2333                 walkable = false,
2334                 node_box = {
2335                         type = "wallmounted",
2336                         wall_top    = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
2337                         wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
2338                         wall_side   = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
2339                 },
2340                 groups = def.groups,
2341                 legacy_wallmounted = true,
2342                 sounds = def.sounds,
2343
2344                 on_construct = function(pos)
2345                         --local n = minetest.get_node(pos)
2346                         local meta = minetest.get_meta(pos)
2347                         meta:set_string("formspec", "field[text;;${text}]")
2348                 end,
2349                 on_receive_fields = function(pos, formname, fields, sender)
2350                         --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
2351                         local player_name = sender:get_player_name()
2352                         if minetest.is_protected(pos, player_name) then
2353                                 minetest.record_protection_violation(pos, player_name)
2354                                 return
2355                         end
2356                         local meta = minetest.get_meta(pos)
2357                         if not fields.text then return end
2358                         minetest.log("action", (player_name or "") .. " wrote \"" ..
2359                                 fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
2360                         meta:set_string("text", fields.text)
2361                         meta:set_string("infotext", '"' .. fields.text .. '"')
2362                 end,
2363         })
2364 end
2365
2366 register_sign("wood", "Wooden", {
2367         sounds = default.node_sound_wood_defaults(),
2368         groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
2369 })
2370
2371 register_sign("steel", "Steel", {
2372         sounds = default.node_sound_metal_defaults(),
2373         groups = {cracky = 2, attached_node = 1}
2374 })
2375
2376 minetest.register_node("default:ladder_wood", {
2377         description = "Wooden Ladder",
2378         drawtype = "signlike",
2379         tiles = {"default_ladder_wood.png"},
2380         inventory_image = "default_ladder_wood.png",
2381         wield_image = "default_ladder_wood.png",
2382         paramtype = "light",
2383         paramtype2 = "wallmounted",
2384         sunlight_propagates = true,
2385         walkable = false,
2386         climbable = true,
2387         is_ground_content = false,
2388         selection_box = {
2389                 type = "wallmounted",
2390                 --wall_top = = <default>
2391                 --wall_bottom = = <default>
2392                 --wall_side = = <default>
2393         },
2394         groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
2395         legacy_wallmounted = true,
2396         sounds = default.node_sound_wood_defaults(),
2397 })
2398
2399 minetest.register_node("default:ladder_steel", {
2400         description = "Steel Ladder",
2401         drawtype = "signlike",
2402         tiles = {"default_ladder_steel.png"},
2403         inventory_image = "default_ladder_steel.png",
2404         wield_image = "default_ladder_steel.png",
2405         paramtype = "light",
2406         paramtype2 = "wallmounted",
2407         sunlight_propagates = true,
2408         walkable = false,
2409         climbable = true,
2410         is_ground_content = false,
2411         selection_box = {
2412                 type = "wallmounted",
2413                 --wall_top = = <default>
2414                 --wall_bottom = = <default>
2415                 --wall_side = = <default>
2416         },
2417         groups = {cracky = 2},
2418         sounds = default.node_sound_metal_defaults(),
2419 })
2420
2421 default.register_fence("default:fence_wood", {
2422         description = "Apple Wood Fence",
2423         texture = "default_fence_wood.png",
2424         inventory_image = "default_fence_overlay.png^default_wood.png^" ..
2425                                 "default_fence_overlay.png^[makealpha:255,126,126",
2426         wield_image = "default_fence_overlay.png^default_wood.png^" ..
2427                                 "default_fence_overlay.png^[makealpha:255,126,126",
2428         material = "default:wood",
2429         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2430         sounds = default.node_sound_wood_defaults()
2431 })
2432
2433 default.register_fence("default:fence_acacia_wood", {
2434         description = "Acacia Wood Fence",
2435         texture = "default_fence_acacia_wood.png",
2436         inventory_image = "default_fence_overlay.png^default_acacia_wood.png^" ..
2437                                 "default_fence_overlay.png^[makealpha:255,126,126",
2438         wield_image = "default_fence_overlay.png^default_acacia_wood.png^" ..
2439                                 "default_fence_overlay.png^[makealpha:255,126,126",
2440         material = "default:acacia_wood",
2441         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2442         sounds = default.node_sound_wood_defaults()
2443 })
2444
2445 default.register_fence("default:fence_junglewood", {
2446         description = "Jungle Wood Fence",
2447         texture = "default_fence_junglewood.png",
2448         inventory_image = "default_fence_overlay.png^default_junglewood.png^" ..
2449                                 "default_fence_overlay.png^[makealpha:255,126,126",
2450         wield_image = "default_fence_overlay.png^default_junglewood.png^" ..
2451                                 "default_fence_overlay.png^[makealpha:255,126,126",
2452         material = "default:junglewood",
2453         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2454         sounds = default.node_sound_wood_defaults()
2455 })
2456
2457 default.register_fence("default:fence_pine_wood", {
2458         description = "Pine Wood Fence",
2459         texture = "default_fence_pine_wood.png",
2460         inventory_image = "default_fence_overlay.png^default_pine_wood.png^" ..
2461                                 "default_fence_overlay.png^[makealpha:255,126,126",
2462         wield_image = "default_fence_overlay.png^default_pine_wood.png^" ..
2463                                 "default_fence_overlay.png^[makealpha:255,126,126",
2464         material = "default:pine_wood",
2465         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2466         sounds = default.node_sound_wood_defaults()
2467 })
2468
2469 default.register_fence("default:fence_aspen_wood", {
2470         description = "Aspen Wood Fence",
2471         texture = "default_fence_aspen_wood.png",
2472         inventory_image = "default_fence_overlay.png^default_aspen_wood.png^" ..
2473                                 "default_fence_overlay.png^[makealpha:255,126,126",
2474         wield_image = "default_fence_overlay.png^default_aspen_wood.png^" ..
2475                                 "default_fence_overlay.png^[makealpha:255,126,126",
2476         material = "default:aspen_wood",
2477         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2478         sounds = default.node_sound_wood_defaults()
2479 })
2480
2481 default.register_fence_rail("default:fence_rail_wood", {
2482         description = "Apple Wood Fence Rail",
2483         texture = "default_fence_rail_wood.png",
2484         inventory_image = "default_fence_rail_overlay.png^default_wood.png^" ..
2485                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2486         wield_image = "default_fence_rail_overlay.png^default_wood.png^" ..
2487                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2488         material = "default:wood",
2489         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2490         sounds = default.node_sound_wood_defaults()
2491 })
2492
2493 default.register_fence_rail("default:fence_rail_acacia_wood", {
2494         description = "Acacia Wood Fence Rail",
2495         texture = "default_fence_rail_acacia_wood.png",
2496         inventory_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" ..
2497                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2498         wield_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" ..
2499                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2500         material = "default:acacia_wood",
2501         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2502         sounds = default.node_sound_wood_defaults()
2503 })
2504
2505 default.register_fence_rail("default:fence_rail_junglewood", {
2506         description = "Jungle Wood Fence Rail",
2507         texture = "default_fence_rail_junglewood.png",
2508         inventory_image = "default_fence_rail_overlay.png^default_junglewood.png^" ..
2509                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2510         wield_image = "default_fence_rail_overlay.png^default_junglewood.png^" ..
2511                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2512         material = "default:junglewood",
2513         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2514         sounds = default.node_sound_wood_defaults()
2515 })
2516
2517 default.register_fence_rail("default:fence_rail_pine_wood", {
2518         description = "Pine Wood Fence Rail",
2519         texture = "default_fence_rail_pine_wood.png",
2520         inventory_image = "default_fence_rail_overlay.png^default_pine_wood.png^" ..
2521                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2522         wield_image = "default_fence_rail_overlay.png^default_pine_wood.png^" ..
2523                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2524         material = "default:pine_wood",
2525         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2526         sounds = default.node_sound_wood_defaults()
2527 })
2528
2529 default.register_fence_rail("default:fence_rail_aspen_wood", {
2530         description = "Aspen Wood Fence Rail",
2531         texture = "default_fence_rail_aspen_wood.png",
2532         inventory_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" ..
2533                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2534         wield_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" ..
2535                                 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2536         material = "default:aspen_wood",
2537         groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2},
2538         sounds = default.node_sound_wood_defaults()
2539 })
2540
2541 minetest.register_node("default:glass", {
2542         description = "Glass",
2543         drawtype = "glasslike_framed_optional",
2544         tiles = {"default_glass.png", "default_glass_detail.png"},
2545         paramtype = "light",
2546         paramtype2 = "glasslikeliquidlevel",
2547         sunlight_propagates = true,
2548         is_ground_content = false,
2549         groups = {cracky = 3, oddly_breakable_by_hand = 3},
2550         sounds = default.node_sound_glass_defaults(),
2551 })
2552
2553 minetest.register_node("default:obsidian_glass", {
2554         description = "Obsidian Glass",
2555         drawtype = "glasslike_framed_optional",
2556         tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
2557         paramtype = "light",
2558         paramtype2 = "glasslikeliquidlevel",
2559         is_ground_content = false,
2560         sunlight_propagates = true,
2561         sounds = default.node_sound_glass_defaults(),
2562         groups = {cracky = 3},
2563 })
2564
2565
2566 minetest.register_node("default:brick", {
2567         description = "Brick Block",
2568         paramtype2 = "facedir",
2569         place_param2 = 0,
2570         tiles = {"default_brick.png"},
2571         is_ground_content = false,
2572         groups = {cracky = 3},
2573         sounds = default.node_sound_stone_defaults(),
2574 })
2575
2576
2577 minetest.register_node("default:meselamp", {
2578         description = "Mese Lamp",
2579         drawtype = "glasslike",
2580         tiles = {"default_meselamp.png"},
2581         paramtype = "light",
2582         sunlight_propagates = true,
2583         is_ground_content = false,
2584         groups = {cracky = 3, oddly_breakable_by_hand = 3},
2585         sounds = default.node_sound_glass_defaults(),
2586         light_source = default.LIGHT_MAX,
2587 })
2588
2589 minetest.register_node("default:mese_post_light", {
2590         description = "Mese Post Light",
2591         tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
2592                 "default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
2593                 "default_mese_post_light_side.png", "default_mese_post_light_side.png"},
2594         wield_image = "default_mese_post_light_side.png",
2595         drawtype = "nodebox",
2596         node_box = {
2597                 type = "fixed",
2598                 fixed = {
2599                         {-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
2600                 },
2601         },
2602         paramtype = "light",
2603         light_source = default.LIGHT_MAX,
2604         sunlight_propagates = true,
2605         is_ground_content = false,
2606         groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2607         sounds = default.node_sound_wood_defaults(),
2608 })
2609
2610 --
2611 -- Misc
2612 --
2613
2614 minetest.register_node("default:cloud", {
2615         description = "Cloud",
2616         tiles = {"default_cloud.png"},
2617         is_ground_content = false,
2618         sounds = default.node_sound_defaults(),
2619         groups = {not_in_creative_inventory = 1},
2620 })
2621
2622 --
2623 -- register trees for leafdecay
2624 --
2625
2626 if minetest.get_mapgen_setting("mg_name") == "v6" then
2627         default.register_leafdecay({
2628                 trunks = {"default:tree"},
2629                 leaves = {"default:apple", "default:leaves"},
2630                 radius = 2,
2631         })
2632
2633         default.register_leafdecay({
2634                 trunks = {"default:jungletree"},
2635                 leaves = {"default:jungleleaves"},
2636                 radius = 3,
2637         })
2638
2639         default.register_leafdecay({
2640                 trunks = {"default:pine_tree"},
2641                 leaves = {"default:pine_needles"},
2642                 radius = 3,
2643         })
2644 else
2645         default.register_leafdecay({
2646                 trunks = {"default:tree"},
2647                 leaves = {"default:apple", "default:leaves"},
2648                 radius = 3,
2649         })
2650
2651         default.register_leafdecay({
2652                 trunks = {"default:jungletree"},
2653                 leaves = {"default:jungleleaves"},
2654                 radius = 2,
2655         })
2656
2657         default.register_leafdecay({
2658                 trunks = {"default:pine_tree"},
2659                 leaves = {"default:pine_needles"},
2660                 radius = 2,
2661         })
2662 end
2663
2664 default.register_leafdecay({
2665         trunks = {"default:acacia_tree"},
2666         leaves = {"default:acacia_leaves"},
2667         radius = 2,
2668 })
2669
2670 default.register_leafdecay({
2671         trunks = {"default:aspen_tree"},
2672         leaves = {"default:aspen_leaves"},
2673         radius = 3,
2674 })
2675
2676 default.register_leafdecay({
2677         trunks = {"default:bush_stem"},
2678         leaves = {"default:bush_leaves"},
2679         radius = 1,
2680 })
2681
2682 default.register_leafdecay({
2683         trunks = {"default:acacia_bush_stem"},
2684         leaves = {"default:acacia_bush_leaves"},
2685         radius = 1,
2686 })
2687
2688 default.register_leafdecay({
2689         trunks = {"default:pine_bush_stem"},
2690         leaves = {"default:pine_bush_needles"},
2691         radius = 1,
2692 })