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