f24cd9afa9ceb40c4461d2f6d19c3845c17426f5
[oweals/minetest_game.git] / mods / default / nodes.lua
1 -- mods/default/nodes.lua
2
3 --[[ Index:
4
5 Stone
6 -----
7 (1. Material 2. Cobble variant 3. Brick variant [4. Modified forms])
8
9 default:stone
10 default:cobble
11 default:stonebrick
12 default:mossycobble
13
14 default:desert_stone
15 default:desert_cobble
16 default:desert_stonebrick
17
18 default:sandstone
19 default:sandstonebrick
20
21 default:obsidian
22 default:obsidianbrick
23
24 Soft / Non-Stone
25 ----------------
26 (1. Material [2. Modified forms])
27
28 default:dirt
29 default:dirt_with_grass
30 default:dirt_with_grass_footsteps
31 default:dirt_with_snow
32
33 default:sand
34 default:desert_sand
35
36 default:gravel
37
38 default:clay
39
40 default:snow
41 default:snowblock
42
43 default:ice
44
45 Trees
46 -----
47 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling [5. Fruits])
48
49 default:tree
50 default:wood
51 default:leaves
52 default:sapling
53 default:apple
54
55 default:jungletree
56 default:junglewood
57 default:jungleleaves
58 default:junglesapling
59
60 default:pinetree
61 default:pinewood
62 default:pine_needles
63 default:pine_sapling
64
65 Ores
66 ----
67 (1. In stone 2. Block)
68
69 default:stone_with_coal
70 default:coalblock
71
72 default:stone_with_iron
73 default:steelblock
74
75 default:stone_with_copper
76 default:copperblock
77 default:bronzeblock
78
79 default:stone_with_gold
80 default:goldblock
81
82 default:stone_with_mese
83 default:mese
84
85 default:stone_with_diamond
86 default:diamondblock
87
88 Plantlife (non-cubic)
89 ---------------------
90 default:cactus
91 default:papyrus
92 default:dry_shrub
93 default:junglegrass
94 default:grass_1
95 default:grass_2
96 default:grass_3
97 default:grass_4
98 default:grass_5
99
100 Liquids
101 -------
102 (1. Source 2. Flowing)
103
104 default:water_source
105 default:water_flowing
106
107 default:river_water_source
108 default:river_water_flowing
109
110 default:lava_source
111 default:lava_flowing
112
113 Tools / "Advanced" crafting / Non-"natural"
114 -------------------------------------------
115 default:torch
116
117 default:chest
118 default:chest_locked
119
120 default:bookshelf
121
122 default:sign_wall
123 default:ladder
124 default:fence_wood
125
126 default:glass
127 default:obsidian_glass
128
129 default:rail
130
131 default:brick
132
133 default:meselamp
134
135 Misc
136 ----
137 default:cloud
138 default:nyancat
139 default:nyancat_rainbow
140
141 --]]
142
143 --
144 -- Stone
145 --
146
147 minetest.register_node("default:stone", {
148         description = "Stone",
149         tiles = {"default_stone.png"},
150         is_ground_content = true,
151         groups = {cracky=3, stone=1},
152         drop = 'default:cobble',
153         legacy_mineral = true,
154         sounds = default.node_sound_stone_defaults(),
155 })
156
157 minetest.register_node("default:cobble", {
158         description = "Cobblestone",
159         tiles = {"default_cobble.png"},
160         is_ground_content = true,
161         groups = {cracky=3, stone=2},
162         sounds = default.node_sound_stone_defaults(),
163 })
164
165 minetest.register_node("default:stonebrick", {
166         description = "Stone Brick",
167         tiles = {"default_stone_brick.png"},
168         groups = {cracky=2, stone=1},
169         sounds = default.node_sound_stone_defaults(),
170 })
171
172 minetest.register_node("default:mossycobble", {
173         description = "Mossy Cobblestone",
174         tiles = {"default_mossycobble.png"},
175         is_ground_content = true,
176         groups = {cracky=3, stone=1},
177         sounds = default.node_sound_stone_defaults(),
178 })
179
180
181
182 minetest.register_node("default:desert_stone", {
183         description = "Desert Stone",
184         tiles = {"default_desert_stone.png"},
185         is_ground_content = true,
186         groups = {cracky=3, stone=1},
187         drop = 'default:desert_cobble',
188         legacy_mineral = true,
189         sounds = default.node_sound_stone_defaults(),
190 })
191
192 minetest.register_node("default:desert_cobble", {
193         description = "Desert Cobblestone",
194         tiles = {"default_desert_cobble.png"},
195         is_ground_content = true,
196         groups = {cracky=3, stone=2},
197         sounds = default.node_sound_stone_defaults(),
198 })
199
200 minetest.register_node("default:desert_stonebrick", {
201         description = "Desert Stone Brick",
202         tiles = {"default_desert_stone_brick.png"},
203         groups = {cracky=2, stone=1},
204         sounds = default.node_sound_stone_defaults(),
205 })
206
207
208
209 minetest.register_node("default:sandstone", {
210         description = "Sandstone",
211         tiles = {"default_sandstone.png"},
212         is_ground_content = true,
213         groups = {crumbly=2,cracky=3},
214         sounds = default.node_sound_stone_defaults(),
215 })
216
217 minetest.register_node("default:sandstonebrick", {
218         description = "Sandstone Brick",
219         tiles = {"default_sandstone_brick.png"},
220         is_ground_content = true,
221         groups = {cracky=2},
222         sounds = default.node_sound_stone_defaults(),
223 })
224
225
226
227 minetest.register_node("default:obsidian", {
228         description = "Obsidian",
229         tiles = {"default_obsidian.png"},
230         is_ground_content = true,
231         sounds = default.node_sound_stone_defaults(),
232         groups = {cracky=1,level=2},
233 })
234
235 minetest.register_node("default:obsidianbrick", {
236         description = "Obsidian Brick",
237         tiles = {"default_obsidian_brick.png"},
238         sounds = default.node_sound_stone_defaults(),
239         groups = {cracky=1,level=2},
240 })
241
242 --
243 -- Soft / Non-Stone
244 --
245
246 minetest.register_node("default:dirt", {
247         description = "Dirt",
248         tiles = {"default_dirt.png"},
249         is_ground_content = true,
250         groups = {crumbly=3,soil=1},
251         sounds = default.node_sound_dirt_defaults(),
252 })
253
254 minetest.register_node("default:dirt_with_grass", {
255         description = "Dirt with Grass",
256         tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
257         is_ground_content = true,
258         groups = {crumbly=3,soil=1},
259         drop = 'default:dirt',
260         sounds = default.node_sound_dirt_defaults({
261                 footstep = {name="default_grass_footstep", gain=0.25},
262         }),
263 })
264
265 minetest.register_node("default:dirt_with_grass_footsteps", {
266         description = "Dirt with Grass and Footsteps",
267         tiles = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
268         is_ground_content = true,
269         groups = {crumbly=3,soil=1,not_in_creative_inventory=1},
270         drop = 'default:dirt',
271         sounds = default.node_sound_dirt_defaults({
272                 footstep = {name="default_grass_footstep", gain=0.25},
273         }),
274 })
275
276 minetest.register_node("default:dirt_with_snow", {
277         description = "Dirt with Snow",
278         tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
279         is_ground_content = true,
280         groups = {crumbly=3,soil=1},
281         drop = 'default:dirt',
282         sounds = default.node_sound_dirt_defaults({
283                 footstep = {name="default_snow_footstep", gain=0.25},
284         }),
285 })
286
287
288
289 minetest.register_node("default:sand", {
290         description = "Sand",
291         tiles = {"default_sand.png"},
292         is_ground_content = true,
293         groups = {crumbly=3, falling_node=1, sand=1},
294         sounds = default.node_sound_sand_defaults(),
295 })
296
297 minetest.register_node("default:desert_sand", {
298         description = "Desert Sand",
299         tiles = {"default_desert_sand.png"},
300         is_ground_content = true,
301         groups = {crumbly=3, falling_node=1, sand=1},
302         sounds = default.node_sound_sand_defaults(),
303 })
304
305
306
307 minetest.register_node("default:gravel", {
308         description = "Gravel",
309         tiles = {"default_gravel.png"},
310         is_ground_content = true,
311         groups = {crumbly=2, falling_node=1},
312         sounds = default.node_sound_dirt_defaults({
313                 footstep = {name="default_gravel_footstep", gain=0.5},
314                 dug = {name="default_gravel_footstep", gain=1.0},
315         }),
316 })
317
318
319
320 minetest.register_node("default:clay", {
321         description = "Clay",
322         tiles = {"default_clay.png"},
323         is_ground_content = true,
324         groups = {crumbly=3},
325         drop = 'default:clay_lump 4',
326         sounds = default.node_sound_dirt_defaults(),
327 })
328
329
330
331 minetest.register_node("default:snow", {
332         description = "Snow",
333         tiles = {"default_snow.png"},
334         inventory_image = "default_snowball.png",
335         wield_image = "default_snowball.png",
336         is_ground_content = true,
337         paramtype = "light",
338         buildable_to = true,
339         drawtype = "nodebox",
340         node_box = {
341                 type = "fixed",
342                 fixed = {
343                         {-0.5, -0.5, -0.5,  0.5, -0.5+2/16, 0.5},
344                 },
345         },
346         groups = {crumbly=3,falling_node=1},
347         sounds = default.node_sound_dirt_defaults({
348                 footstep = {name="default_snow_footstep", gain=0.25},
349                 dug = {name="default_snow_footstep", gain=0.75},
350         }),
351
352         on_construct = function(pos)
353                 pos.y = pos.y - 1
354                 if minetest.get_node(pos).name == "default:dirt_with_grass" then
355                         minetest.set_node(pos, {name="default:dirt_with_snow"})
356                 end
357         end,
358 })
359
360
361 minetest.register_node("default:snowblock", {
362         description = "Snow Block",
363         tiles = {"default_snow.png"},
364         is_ground_content = true,
365         groups = {crumbly=3},
366         sounds = default.node_sound_dirt_defaults({
367                 footstep = {name="default_snow_footstep", gain=0.25},
368                 dug = {name="default_snow_footstep", gain=0.75},
369         }),
370 })
371
372
373
374 minetest.register_node("default:ice", {
375         description = "Ice",
376         tiles = {"default_ice.png"},
377         is_ground_content = false,
378         paramtype = "light",
379         groups = {cracky=3},
380         sounds = default.node_sound_glass_defaults(),
381 })
382
383 --
384 -- Trees
385 --
386
387 minetest.register_node("default:tree", {
388         description = "Tree",
389         tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
390         paramtype2 = "facedir",
391         is_ground_content = false,
392         groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
393         sounds = default.node_sound_wood_defaults(),
394
395         on_place = minetest.rotate_node
396 })
397
398 minetest.register_node("default:wood", {
399         description = "Wooden Planks",
400         tiles = {"default_wood.png"},
401         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
402         sounds = default.node_sound_wood_defaults(),
403 })
404
405 minetest.register_node("default:sapling", {
406         description = "Sapling",
407         drawtype = "plantlike",
408         visual_scale = 1.0,
409         tiles = {"default_sapling.png"},
410         inventory_image = "default_sapling.png",
411         wield_image = "default_sapling.png",
412         paramtype = "light",
413         sunlight_propagates = true,
414         walkable = false,
415         is_ground_content = true,
416         selection_box = {
417                 type = "fixed",
418                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
419         },
420         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
421         sounds = default.node_sound_leaves_defaults(),
422 })
423
424 minetest.register_node("default:leaves", {
425         description = "Leaves",
426         drawtype = "allfaces_optional",
427         waving = 1,
428         visual_scale = 1.3,
429         tiles = {"default_leaves.png"},
430         paramtype = "light",
431         is_ground_content = false,
432         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
433         drop = {
434                 max_items = 1,
435                 items = {
436                         {
437                                 -- player will get sapling with 1/20 chance
438                                 items = {'default:sapling'},
439                                 rarity = 20,
440                         },
441                         {
442                                 -- player will get leaves only if he get no saplings,
443                                 -- this is because max_items is 1
444                                 items = {'default:leaves'},
445                         }
446                 }
447         },
448         sounds = default.node_sound_leaves_defaults(),
449
450         after_place_node = default.after_place_leaves,
451 })
452
453 minetest.register_node("default:apple", {
454         description = "Apple",
455         drawtype = "plantlike",
456         visual_scale = 1.0,
457         tiles = {"default_apple.png"},
458         inventory_image = "default_apple.png",
459         paramtype = "light",
460         sunlight_propagates = true,
461         walkable = false,
462         is_ground_content = true,
463         selection_box = {
464                 type = "fixed",
465                 fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
466         },
467         groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
468         on_use = minetest.item_eat(2),
469         sounds = default.node_sound_leaves_defaults(),
470
471         after_place_node = function(pos, placer, itemstack)
472                 if placer:is_player() then
473                         minetest.set_node(pos, {name="default:apple", param2=1})
474                 end
475         end,
476 })
477
478
479
480 minetest.register_node("default:jungletree", {
481         description = "Jungle Tree",
482         tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
483         paramtype2 = "facedir",
484         is_ground_content = false,
485         groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
486         sounds = default.node_sound_wood_defaults(),
487
488         on_place = minetest.rotate_node
489 })
490
491 minetest.register_node("default:junglewood", {
492         description = "Junglewood Planks",
493         tiles = {"default_junglewood.png"},
494         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
495         sounds = default.node_sound_wood_defaults(),
496 })
497
498 minetest.register_node("default:jungleleaves", {
499         description = "Jungle Leaves",
500         drawtype = "allfaces_optional",
501         waving = 1,
502         visual_scale = 1.3,
503         tiles = {"default_jungleleaves.png"},
504         paramtype = "light",
505         is_ground_content = false,
506         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
507         drop = {
508                 max_items = 1,
509                 items = {
510                         {
511                                 -- player will get sapling with 1/20 chance
512                                 items = {'default:junglesapling'},
513                                 rarity = 20,
514                         },
515                         {
516                                 -- player will get leaves only if he get no saplings,
517                                 -- this is because max_items is 1
518                                 items = {'default:jungleleaves'},
519                         }
520                 }
521         },
522         sounds = default.node_sound_leaves_defaults(),
523
524         after_place_node = default.after_place_leaves,
525 })
526
527 minetest.register_node("default:junglesapling", {
528         description = "Jungle Sapling",
529         drawtype = "plantlike",
530         visual_scale = 1.0,
531         tiles = {"default_junglesapling.png"},
532         inventory_image = "default_junglesapling.png",
533         wield_image = "default_junglesapling.png",
534         paramtype = "light",
535         sunlight_propagates = true,
536         walkable = false,
537         selection_box = {
538                 type = "fixed",
539                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
540         },
541         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
542         sounds = default.node_sound_leaves_defaults(),
543 })
544
545
546
547 minetest.register_node("default:pinetree", {
548         description = "Pine Tree",
549         tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
550         paramtype2 = "facedir",
551         is_ground_content = false,
552         groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
553         sounds = default.node_sound_wood_defaults(),
554
555         on_place = minetest.rotate_node
556 })
557
558 minetest.register_node("default:pinewood", {
559         description = "Pinewood Planks",
560         tiles = {"default_pinewood.png"},
561         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
562         sounds = default.node_sound_wood_defaults(),
563 })
564
565 minetest.register_node("default:pine_needles",{
566         description = "Pine Needles",
567         drawtype = "allfaces_optional",
568         visual_scale = 1.3,
569         tiles = {"default_pine_needles.png"},
570         waving = 1,
571         paramtype = "light",
572         is_ground_content = false,
573         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
574         drop = {
575                 max_items = 1,
576                 items = {
577                         {
578                                 -- player will get sapling with 1/20 chance
579                                 items = {"default:pine_sapling"},
580                                 rarity = 20,
581                         },
582                         {
583                                 -- player will get leaves only if he get no saplings,
584                                 -- this is because max_items is 1
585                                 items = {"default:pine_needles"},
586                         }
587                 }
588         },
589         sounds = default.node_sound_leaves_defaults(),
590
591         after_place_node = default.after_place_leaves,
592 })
593
594 minetest.register_node("default:pine_sapling", {
595         description = "Pine Sapling",
596         drawtype = "plantlike",
597         visual_scale = 1.0,
598         tiles = {"default_pine_sapling.png"},
599         inventory_image = "default_pine_sapling.png",
600         wield_image = "default_pine_sapling.png",
601         paramtype = "light",
602         walkable = false,
603         is_ground_content = true,
604         selection_box = {
605                 type = "fixed",
606                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
607         },
608         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
609         sounds = default.node_sound_leaves_defaults(),
610 })
611
612 --
613 -- Ores
614 --
615
616 minetest.register_node("default:stone_with_coal", {
617         description = "Coal Ore",
618         tiles = {"default_stone.png^default_mineral_coal.png"},
619         is_ground_content = true,
620         groups = {cracky=3},
621         drop = 'default:coal_lump',
622         sounds = default.node_sound_stone_defaults(),
623 })
624
625 minetest.register_node("default:coalblock", {
626         description = "Coal Block",
627         tiles = {"default_coal_block.png"},
628         is_ground_content = true,
629         groups = {cracky=3},
630         sounds = default.node_sound_stone_defaults(),
631 })
632
633
634
635 minetest.register_node("default:stone_with_iron", {
636         description = "Iron Ore",
637         tiles = {"default_stone.png^default_mineral_iron.png"},
638         is_ground_content = true,
639         groups = {cracky=2},
640         drop = 'default:iron_lump',
641         sounds = default.node_sound_stone_defaults(),
642 })
643
644 minetest.register_node("default:steelblock", {
645         description = "Steel Block",
646         tiles = {"default_steel_block.png"},
647         is_ground_content = true,
648         groups = {cracky=1,level=2},
649         sounds = default.node_sound_stone_defaults(),
650 })
651
652
653
654 minetest.register_node("default:stone_with_copper", {
655         description = "Copper Ore",
656         tiles = {"default_stone.png^default_mineral_copper.png"},
657         is_ground_content = true,
658         groups = {cracky=2},
659         drop = 'default:copper_lump',
660         sounds = default.node_sound_stone_defaults(),
661 })
662
663 minetest.register_node("default:copperblock", {
664         description = "Copper Block",
665         tiles = {"default_copper_block.png"},
666         is_ground_content = true,
667         groups = {cracky=1,level=2},
668         sounds = default.node_sound_stone_defaults(),
669 })
670
671 minetest.register_node("default:bronzeblock", {
672         description = "Bronze Block",
673         tiles = {"default_bronze_block.png"},
674         is_ground_content = true,
675         groups = {cracky=1,level=2},
676         sounds = default.node_sound_stone_defaults(),
677 })
678
679
680
681 minetest.register_node("default:stone_with_mese", {
682         description = "Mese Ore",
683         tiles = {"default_stone.png^default_mineral_mese.png"},
684         paramtype = "light",
685         is_ground_content = true,
686         groups = {cracky = 1},
687         drop = "default:mese_crystal",
688         sounds = default.node_sound_stone_defaults(),
689         light_source = 1,
690 })
691
692 minetest.register_node("default:mese", {
693         description = "Mese Block",
694         tiles = {"default_mese_block.png"},
695         paramtype = "light",
696         is_ground_content = true,
697         groups = {cracky = 1, level = 2},
698         sounds = default.node_sound_stone_defaults(),
699         light_source = 3,
700 })
701
702
703
704
705 minetest.register_node("default:stone_with_gold", {
706         description = "Gold Ore",
707         tiles = {"default_stone.png^default_mineral_gold.png"},
708         is_ground_content = true,
709         groups = {cracky=2},
710         drop = "default:gold_lump",
711         sounds = default.node_sound_stone_defaults(),
712 })
713
714 minetest.register_node("default:goldblock", {
715         description = "Gold Block",
716         tiles = {"default_gold_block.png"},
717         is_ground_content = true,
718         groups = {cracky=1},
719         sounds = default.node_sound_stone_defaults(),
720 })
721
722
723
724 minetest.register_node("default:stone_with_diamond", {
725         description = "Diamond Ore",
726         tiles = {"default_stone.png^default_mineral_diamond.png"},
727         is_ground_content = true,
728         groups = {cracky=1},
729         drop = "default:diamond",
730         sounds = default.node_sound_stone_defaults(),
731 })
732
733 minetest.register_node("default:diamondblock", {
734         description = "Diamond Block",
735         tiles = {"default_diamond_block.png"},
736         is_ground_content = true,
737         groups = {cracky=1,level=3},
738         sounds = default.node_sound_stone_defaults(),
739 })
740
741 --
742 -- Plantlife (non-cubic)
743 --
744
745 minetest.register_node("default:cactus", {
746         description = "Cactus",
747         tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
748         paramtype2 = "facedir",
749         is_ground_content = true,
750         groups = {snappy=1,choppy=3,flammable=2},
751         sounds = default.node_sound_wood_defaults(),
752         on_place = minetest.rotate_node,
753
754         after_dig_node = function(pos, node, metadata, digger)
755                 default.dig_up(pos, node, digger)
756         end,
757 })
758
759 minetest.register_node("default:papyrus", {
760         description = "Papyrus",
761         drawtype = "plantlike",
762         tiles = {"default_papyrus.png"},
763         inventory_image = "default_papyrus.png",
764         wield_image = "default_papyrus.png",
765         paramtype = "light",
766         sunlight_propagates = true,
767         walkable = false,
768         is_ground_content = true,
769         selection_box = {
770                 type = "fixed",
771                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
772         },
773         groups = {snappy=3,flammable=2},
774         sounds = default.node_sound_leaves_defaults(),
775
776         after_dig_node = function(pos, node, metadata, digger)
777                 default.dig_up(pos, node, digger)
778         end,
779 })
780
781 minetest.register_node("default:dry_shrub", {
782         description = "Dry Shrub",
783         drawtype = "plantlike",
784         waving = 1,
785         visual_scale = 1.0,
786         tiles = {"default_dry_shrub.png"},
787         inventory_image = "default_dry_shrub.png",
788         wield_image = "default_dry_shrub.png",
789         paramtype = "light",
790         sunlight_propagates = true,
791         walkable = false,
792         is_ground_content = true,
793         buildable_to = true,
794         groups = {snappy=3,flammable=3,attached_node=1},
795         sounds = default.node_sound_leaves_defaults(),
796         selection_box = {
797                 type = "fixed",
798                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
799         },
800 })
801
802 minetest.register_node("default:junglegrass", {
803         description = "Jungle Grass",
804         drawtype = "plantlike",
805         waving = 1,
806         visual_scale = 1.3,
807         tiles = {"default_junglegrass.png"},
808         inventory_image = "default_junglegrass.png",
809         wield_image = "default_junglegrass.png",
810         paramtype = "light",
811         sunlight_propagates = true,
812         walkable = false,
813         buildable_to = true,
814         is_ground_content = true,
815         groups = {snappy=3,flammable=2,flora=1,attached_node=1},
816         sounds = default.node_sound_leaves_defaults(),
817         selection_box = {
818                 type = "fixed",
819                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
820         },
821 })
822
823 minetest.register_node("default:grass_1", {
824         description = "Grass",
825         drawtype = "plantlike",
826         waving = 1,
827         tiles = {"default_grass_1.png"},
828         -- Use texture of a taller grass stage in inventory
829         inventory_image = "default_grass_3.png",
830         wield_image = "default_grass_3.png",
831         paramtype = "light",
832         sunlight_propagates = true,
833         walkable = false,
834         is_ground_content = true,
835         buildable_to = true,
836         groups = {snappy=3,flammable=3,flora=1,attached_node=1},
837         sounds = default.node_sound_leaves_defaults(),
838         selection_box = {
839                 type = "fixed",
840                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
841         },
842
843         on_place = function(itemstack, placer, pointed_thing)
844                 -- place a random grass node
845                 local stack = ItemStack("default:grass_"..math.random(1,5))
846                 local ret = minetest.item_place(stack, placer, pointed_thing)
847                 return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
848         end,
849 })
850
851 for i=2,5 do
852         minetest.register_node("default:grass_"..i, {
853                 description = "Grass",
854                 drawtype = "plantlike",
855                 waving = 1,
856                 tiles = {"default_grass_"..i..".png"},
857                 inventory_image = "default_grass_"..i..".png",
858                 wield_image = "default_grass_"..i..".png",
859                 paramtype = "light",
860                 sunlight_propagates = true,
861                 walkable = false,
862                 buildable_to = true,
863                 is_ground_content = true,
864                 drop = "default:grass_1",
865                 groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
866                 sounds = default.node_sound_leaves_defaults(),
867                 selection_box = {
868                         type = "fixed",
869                         fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
870                 },
871         })
872 end
873
874 --
875 -- Liquids
876 --
877
878 minetest.register_node("default:water_source", {
879         description = "Water Source",
880         inventory_image = minetest.inventorycube("default_water.png"),
881         drawtype = "liquid",
882         tiles = {
883                 {
884                         name = "default_water_source_animated.png",
885                         animation = {
886                                 type = "vertical_frames",
887                                 aspect_w = 16,
888                                 aspect_h = 16,
889                                 length = 2.0,
890                         },
891                 },
892         },
893         special_tiles = {
894                 -- New-style water source material (mostly unused)
895                 {
896                         name = "default_water_source_animated.png",
897                         animation = {
898                                 type = "vertical_frames",
899                                 aspect_w = 16,
900                                 aspect_h = 16,
901                                 length = 2.0,
902                         },
903                         backface_culling = false,
904                 },
905         },
906         alpha = 160,
907         paramtype = "light",
908         walkable = false,
909         pointable = false,
910         diggable = false,
911         buildable_to = true,
912         is_ground_content = false,
913         drop = "",
914         drowning = 1,
915         liquidtype = "source",
916         liquid_alternative_flowing = "default:water_flowing",
917         liquid_alternative_source = "default:water_source",
918         liquid_viscosity = 1,
919         post_effect_color = {a=64, r=100, g=100, b=200},
920         groups = {water=3, liquid=3, puts_out_fire=1},
921 })
922
923 minetest.register_node("default:water_flowing", {
924         description = "Flowing Water",
925         inventory_image = minetest.inventorycube("default_water.png"),
926         drawtype = "flowingliquid",
927         tiles = {"default_water.png"},
928         special_tiles = {
929                 {
930                         name = "default_water_flowing_animated.png",
931                         backface_culling = false,
932                         animation = {
933                                 type = "vertical_frames",
934                                 aspect_w = 16,
935                                 aspect_h = 16,
936                                 length = 0.8,
937                         },
938                 },
939                 {
940                         name = "default_water_flowing_animated.png",
941                         backface_culling = true,
942                         animation = {
943                                 type = "vertical_frames",
944                                 aspect_w = 16,
945                                 aspect_h = 16,
946                                 length = 0.8,
947                         },
948                 },
949         },
950         alpha = 160,
951         paramtype = "light",
952         paramtype2 = "flowingliquid",
953         walkable = false,
954         pointable = false,
955         diggable = false,
956         buildable_to = true,
957         is_ground_content = false,
958         drop = "",
959         drowning = 1,
960         liquidtype = "flowing",
961         liquid_alternative_flowing = "default:water_flowing",
962         liquid_alternative_source = "default:water_source",
963         liquid_viscosity = 1,
964         post_effect_color = {a=64, r=100, g=100, b=200},
965         groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
966 })
967
968
969 minetest.register_node("default:river_water_source", {
970         description = "River Water Source",
971         inventory_image = minetest.inventorycube("default_water.png"),
972         drawtype = "liquid",
973         tiles = {
974                 {
975                         name = "default_water_source_animated.png",
976                         animation = {
977                                 type = "vertical_frames",
978                                 aspect_w = 16,
979                                 aspect_h = 16,
980                                 length = 2.0,
981                         },
982                 },
983         },
984         special_tiles = {
985                 {
986                         name = "default_water_source_animated.png",
987                         animation = {
988                                 type = "vertical_frames",
989                                 aspect_w = 16,
990                                 aspect_h = 16,
991                                 length = 2.0,
992                         },
993                         backface_culling = false,
994                 },
995         },
996         alpha = 160,
997         paramtype = "light",
998         walkable = false,
999         pointable = false,
1000         diggable = false,
1001         buildable_to = true,
1002         is_ground_content = false,
1003         drop = "",
1004         drowning = 1,
1005         liquidtype = "source",
1006         liquid_alternative_flowing = "default:river_water_flowing",
1007         liquid_alternative_source = "default:river_water_source",
1008         liquid_viscosity = 1,
1009         liquid_renewable = false,
1010         liquid_range = 2,
1011         post_effect_color = {a=64, r=100, g=100, b=200},
1012         groups = {water=3, liquid=3, puts_out_fire=1},
1013 })
1014
1015 minetest.register_node("default:river_water_flowing", {
1016         description = "Flowing River Water",
1017         inventory_image = minetest.inventorycube("default_water.png"),
1018         drawtype = "flowingliquid",
1019         tiles = {"default_water.png"},
1020         special_tiles = {
1021                 {
1022                         name = "default_water_flowing_animated.png",
1023                         backface_culling = false,
1024                         animation = {
1025                                 type = "vertical_frames",
1026                                 aspect_w = 16,
1027                                 aspect_h = 16,
1028                                 length = 0.8,
1029                         },
1030                 },
1031                 {
1032                         name = "default_water_flowing_animated.png",
1033                         backface_culling = true,
1034                         animation = {
1035                                 type = "vertical_frames",
1036                                 aspect_w = 16,
1037                                 aspect_h = 16,
1038                                 length = 0.8,
1039                         },
1040                 },
1041         },
1042         alpha = 160,
1043         paramtype = "light",
1044         paramtype2 = "flowingliquid",
1045         walkable = false,
1046         pointable = false,
1047         diggable = false,
1048         buildable_to = true,
1049         is_ground_content = false,
1050         drop = "",
1051         drowning = 1,
1052         liquidtype = "flowing",
1053         liquid_alternative_flowing = "default:river_water_flowing",
1054         liquid_alternative_source = "default:river_water_source",
1055         liquid_viscosity = 1,
1056         liquid_renewable = false,
1057         liquid_range = 2,
1058         post_effect_color = {a=64, r=100, g=100, b=200},
1059         groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
1060 })
1061
1062
1063
1064 minetest.register_node("default:lava_source", {
1065         description = "Lava Source",
1066         inventory_image = minetest.inventorycube("default_lava.png"),
1067         drawtype = "liquid",
1068         tiles = {
1069                 {
1070                         name = "default_lava_source_animated.png",
1071                         animation = {
1072                                 type = "vertical_frames",
1073                                 aspect_w = 16,
1074                                 aspect_h = 16,
1075                                 length = 3.0,
1076                         },
1077                 },
1078         },
1079         special_tiles = {
1080                 -- New-style lava source material (mostly unused)
1081                 {
1082                         name = "default_lava_source_animated.png",
1083                         animation = {
1084                                 type = "vertical_frames",
1085                                 aspect_w = 16,
1086                                 aspect_h = 16,
1087                                 length = 3.0,
1088                         },
1089                         backface_culling = false,
1090                 },
1091         },
1092         paramtype = "light",
1093         light_source = default.LIGHT_MAX - 1,
1094         walkable = false,
1095         pointable = false,
1096         diggable = false,
1097         buildable_to = true,
1098         is_ground_content = false,
1099         drop = "",
1100         drowning = 1,
1101         liquidtype = "source",
1102         liquid_alternative_flowing = "default:lava_flowing",
1103         liquid_alternative_source = "default:lava_source",
1104         liquid_viscosity = 7,
1105         liquid_renewable = false,
1106         damage_per_second = 4 * 2,
1107         post_effect_color = {a=192, r=255, g=64, b=0},
1108         groups = {lava=3, liquid=2, hot=3, igniter=1},
1109 })
1110
1111 minetest.register_node("default:lava_flowing", {
1112         description = "Flowing Lava",
1113         inventory_image = minetest.inventorycube("default_lava.png"),
1114         drawtype = "flowingliquid",
1115         tiles = {"default_lava.png"},
1116         special_tiles = {
1117                 {
1118                         name = "default_lava_flowing_animated.png",
1119                         backface_culling = false,
1120                         animation = {
1121                                 type = "vertical_frames",
1122                                 aspect_w = 16,
1123                                 aspect_h = 16,
1124                                 length = 3.3,
1125                         },
1126                 },
1127                 {
1128                         name = "default_lava_flowing_animated.png",
1129                         backface_culling = true,
1130                         animation = {
1131                                 type = "vertical_frames",
1132                                 aspect_w = 16,
1133                                 aspect_h = 16,
1134                                 length = 3.3,
1135                         },
1136                 },
1137         },
1138         paramtype = "light",
1139         paramtype2 = "flowingliquid",
1140         light_source = default.LIGHT_MAX - 1,
1141         walkable = false,
1142         pointable = false,
1143         diggable = false,
1144         buildable_to = true,
1145         is_ground_content = false,
1146         drop = "",
1147         drowning = 1,
1148         liquidtype = "flowing",
1149         liquid_alternative_flowing = "default:lava_flowing",
1150         liquid_alternative_source = "default:lava_source",
1151         liquid_viscosity = 7,
1152         liquid_renewable = false,
1153         damage_per_second = 4 * 2,
1154         post_effect_color = {a=192, r=255, g=64, b=0},
1155         groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
1156 })
1157
1158 --
1159 -- Tools / "Advanced" crafting / Non-"natural"
1160 --
1161
1162 minetest.register_node("default:torch", {
1163         description = "Torch",
1164         drawtype = "torchlike",
1165         tiles = {
1166                 {
1167                         name = "default_torch_on_floor_animated.png",
1168                         animation = {
1169                                 type = "vertical_frames",
1170                                 aspect_w = 16,
1171                                 aspect_h = 16,
1172                                 length = 3.0
1173                         },
1174                 },
1175                 {
1176                         name="default_torch_on_ceiling_animated.png",
1177                         animation = {
1178                                 type = "vertical_frames",
1179                                 aspect_w = 16,
1180                                 aspect_h = 16,
1181                                 length = 3.0
1182                         },
1183                 },
1184                 {
1185                         name="default_torch_animated.png",
1186                         animation = {
1187                                 type = "vertical_frames",
1188                                 aspect_w = 16,
1189                                 aspect_h = 16,
1190                                 length = 3.0
1191                         },
1192                 },
1193         },
1194         inventory_image = "default_torch_on_floor.png",
1195         wield_image = "default_torch_on_floor.png",
1196         paramtype = "light",
1197         paramtype2 = "wallmounted",
1198         sunlight_propagates = true,
1199         is_ground_content = false,
1200         walkable = false,
1201         light_source = default.LIGHT_MAX - 1,
1202         selection_box = {
1203                 type = "wallmounted",
1204                 wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
1205                 wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
1206                 wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
1207         },
1208         groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
1209         legacy_wallmounted = true,
1210         sounds = default.node_sound_defaults(),
1211 })
1212
1213
1214
1215 local chest_formspec =
1216         "size[8,9]"..
1217         default.gui_bg..
1218         default.gui_bg_img..
1219         default.gui_slots..
1220         "list[current_name;main;0,0.3;8,4;]"..
1221         "list[current_player;main;0,4.85;8,1;]"..
1222         "list[current_player;main;0,6.08;8,3;8]"..
1223         default.get_hotbar_bg(0,4.85)
1224
1225 local function get_locked_chest_formspec(pos)
1226         local spos = pos.x .. "," .. pos.y .. "," ..pos.z
1227         local formspec =
1228                 "size[8,9]"..
1229                 default.gui_bg..
1230                 default.gui_bg_img..
1231                 default.gui_slots..
1232                 "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"..
1233                 "list[current_player;main;0,4.85;8,1;]"..
1234                 "list[current_player;main;0,6.08;8,3;8]"..
1235                 default.get_hotbar_bg(0,4.85)
1236  return formspec
1237 end
1238
1239 local function has_locked_chest_privilege(meta, player)
1240         if player:get_player_name() ~= meta:get_string("owner") then
1241                 return false
1242         end
1243         return true
1244 end
1245
1246 minetest.register_node("default:chest", {
1247         description = "Chest",
1248         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1249                 "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
1250         paramtype2 = "facedir",
1251         groups = {choppy=2,oddly_breakable_by_hand=2},
1252         legacy_facedir_simple = true,
1253         is_ground_content = false,
1254         sounds = default.node_sound_wood_defaults(),
1255
1256         on_construct = function(pos)
1257                 local meta = minetest.get_meta(pos)
1258                 meta:set_string("formspec", chest_formspec)
1259                 meta:set_string("infotext", "Chest")
1260                 local inv = meta:get_inventory()
1261                 inv:set_size("main", 8*4)
1262         end,
1263         can_dig = function(pos,player)
1264                 local meta = minetest.get_meta(pos);
1265                 local inv = meta:get_inventory()
1266                 return inv:is_empty("main")
1267         end,
1268         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1269                 minetest.log("action", player:get_player_name()..
1270                                 " moves stuff in chest at "..minetest.pos_to_string(pos))
1271         end,
1272     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1273                 minetest.log("action", player:get_player_name()..
1274                                 " moves stuff to chest at "..minetest.pos_to_string(pos))
1275         end,
1276     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1277                 minetest.log("action", player:get_player_name()..
1278                                 " takes stuff from chest at "..minetest.pos_to_string(pos))
1279         end,
1280 })
1281
1282
1283
1284 minetest.register_node("default:chest_locked", {
1285         description = "Locked Chest",
1286         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1287                 "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
1288         paramtype2 = "facedir",
1289         groups = {choppy=2,oddly_breakable_by_hand=2},
1290         legacy_facedir_simple = true,
1291         is_ground_content = false,
1292         sounds = default.node_sound_wood_defaults(),
1293
1294         after_place_node = function(pos, placer)
1295                 local meta = minetest.get_meta(pos)
1296                 meta:set_string("owner", placer:get_player_name() or "")
1297                 meta:set_string("infotext", "Locked Chest (owned by "..
1298                                 meta:get_string("owner")..")")
1299         end,
1300         on_construct = function(pos)
1301                 local meta = minetest.get_meta(pos)
1302                 meta:set_string("infotext", "Locked Chest")
1303                 meta:set_string("owner", "")
1304                 local inv = meta:get_inventory()
1305                 inv:set_size("main", 8*4)
1306         end,
1307         can_dig = function(pos,player)
1308                 local meta = minetest.get_meta(pos);
1309                 local inv = meta:get_inventory()
1310                 return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
1311         end,
1312         allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1313                 local meta = minetest.get_meta(pos)
1314                 if not has_locked_chest_privilege(meta, player) then
1315                         return 0
1316                 end
1317                 return count
1318         end,
1319     allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1320                 local meta = minetest.get_meta(pos)
1321                 if not has_locked_chest_privilege(meta, player) then
1322                         return 0
1323                 end
1324                 return stack:get_count()
1325         end,
1326     allow_metadata_inventory_take = function(pos, listname, index, stack, player)
1327                 local meta = minetest.get_meta(pos)
1328                 if not has_locked_chest_privilege(meta, player) then
1329                         return 0
1330                 end
1331                 return stack:get_count()
1332         end,
1333     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1334                 minetest.log("action", player:get_player_name()..
1335                                 " moves stuff to locked chest at "..minetest.pos_to_string(pos))
1336         end,
1337     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1338                 minetest.log("action", player:get_player_name()..
1339                                 " takes stuff from locked chest at "..minetest.pos_to_string(pos))
1340         end,
1341         on_rightclick = function(pos, node, clicker)
1342                 local meta = minetest.get_meta(pos)
1343                 if has_locked_chest_privilege(meta, clicker) then
1344                         minetest.show_formspec(
1345                                 clicker:get_player_name(),
1346                                 "default:chest_locked",
1347                                 get_locked_chest_formspec(pos)
1348                         )
1349                 end
1350         end,
1351         on_blast = function() end,
1352 })
1353
1354
1355
1356 local bookshelf_formspec =
1357         "size[8,7;]"..
1358         default.gui_bg..
1359         default.gui_bg_img..
1360         default.gui_slots..
1361         "list[context;books;0,0.3;8,2;]"..
1362         "list[current_player;main;0,2.85;8,1;]"..
1363         "list[current_player;main;0,4.08;8,3;8]"..
1364         default.get_hotbar_bg(0,2.85)
1365
1366 minetest.register_node("default:bookshelf", {
1367         description = "Bookshelf",
1368         tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
1369         is_ground_content = false,
1370         groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
1371         sounds = default.node_sound_wood_defaults(),
1372
1373         on_construct = function(pos)
1374                 local meta = minetest.get_meta(pos)
1375                 meta:set_string("formspec", bookshelf_formspec)
1376                 local inv = meta:get_inventory()
1377                 inv:set_size("books", 8*2)
1378         end,
1379         can_dig = function(pos,player)
1380                 local meta = minetest.get_meta(pos);
1381                 local inv = meta:get_inventory()
1382                 return inv:is_empty("books")
1383         end,
1384
1385         allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1386                 local meta = minetest.get_meta(pos)
1387                 local inv = meta:get_inventory()
1388                 local to_stack = inv:get_stack(listname, index)
1389                 if listname == "books" then
1390                         if minetest.get_item_group(stack:get_name(), "book") ~= 0
1391                                         and to_stack:is_empty() then
1392                                 return 1
1393                         else
1394                                 return 0
1395                         end
1396                 end
1397         end,
1398
1399         allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1400                 local meta = minetest.get_meta(pos)
1401                 local inv = meta:get_inventory()
1402                 local stack = inv:get_stack(from_list, from_index)
1403                 local to_stack = inv:get_stack(to_list, to_index)
1404                 if to_list == "books" then
1405                         if stack:get_name() == "default:book" and to_stack:is_empty() then
1406                                 return 1
1407                         else
1408                                 return 0
1409                         end
1410                 end
1411         end,
1412
1413         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1414                 minetest.log("action", player:get_player_name()..
1415                            " moves stuff in bookshelf at "..minetest.pos_to_string(pos))
1416         end,
1417         on_metadata_inventory_put = function(pos, listname, index, stack, player)
1418                 minetest.log("action", player:get_player_name()..
1419                            " moves stuff to bookshelf at "..minetest.pos_to_string(pos))
1420         end,
1421         on_metadata_inventory_take = function(pos, listname, index, stack, player)
1422                 minetest.log("action", player:get_player_name()..
1423                            " takes stuff from bookshelf at "..minetest.pos_to_string(pos))
1424         end,
1425 })
1426
1427
1428
1429 minetest.register_node("default:sign_wall", {
1430         description = "Sign",
1431         drawtype = "nodebox",
1432         tiles = {"default_sign.png"},
1433         inventory_image = "default_sign_wall.png",
1434         wield_image = "default_sign_wall.png",
1435         paramtype = "light",
1436         paramtype2 = "wallmounted",
1437         sunlight_propagates = true,
1438         is_ground_content = false,
1439         walkable = false,
1440         node_box = {
1441                 type = "wallmounted",
1442                 wall_top    = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
1443                 wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
1444                 wall_side   = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
1445         },
1446         groups = {choppy=2,dig_immediate=2,attached_node=1},
1447         legacy_wallmounted = true,
1448         sounds = default.node_sound_defaults(),
1449
1450         on_construct = function(pos)
1451                 --local n = minetest.get_node(pos)
1452                 local meta = minetest.get_meta(pos)
1453                 meta:set_string("formspec", "field[text;;${text}]")
1454                 meta:set_string("infotext", "\"\"")
1455         end,
1456         on_receive_fields = function(pos, formname, fields, sender)
1457                 --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
1458                 if minetest.is_protected(pos, sender:get_player_name()) then
1459                         minetest.record_protection_violation(pos, sender:get_player_name())
1460                         return
1461                 end
1462                 local meta = minetest.get_meta(pos)
1463                 if not fields.text then return end
1464                 minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
1465                                 "\" to sign at "..minetest.pos_to_string(pos))
1466                 meta:set_string("text", fields.text)
1467                 meta:set_string("infotext", '"'..fields.text..'"')
1468         end,
1469 })
1470
1471 minetest.register_node("default:ladder", {
1472         description = "Ladder",
1473         drawtype = "signlike",
1474         tiles = {"default_ladder.png"},
1475         inventory_image = "default_ladder.png",
1476         wield_image = "default_ladder.png",
1477         paramtype = "light",
1478         paramtype2 = "wallmounted",
1479         sunlight_propagates = true,
1480         walkable = false,
1481         climbable = true,
1482         is_ground_content = false,
1483         selection_box = {
1484                 type = "wallmounted",
1485                 --wall_top = = <default>
1486                 --wall_bottom = = <default>
1487                 --wall_side = = <default>
1488         },
1489         groups = {choppy=2,oddly_breakable_by_hand=3,flammable=2},
1490         legacy_wallmounted = true,
1491         sounds = default.node_sound_wood_defaults(),
1492 })
1493
1494 local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
1495 minetest.register_node("default:fence_wood", {
1496         description = "Wooden Fence",
1497         drawtype = "fencelike",
1498         tiles = {"default_wood.png"},
1499         inventory_image = fence_texture,
1500         wield_image = fence_texture,
1501         paramtype = "light",
1502         sunlight_propagates = true,
1503         is_ground_content = false,
1504         selection_box = {
1505                 type = "fixed",
1506                 fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
1507         },
1508         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
1509         sounds = default.node_sound_wood_defaults(),
1510 })
1511
1512
1513
1514 minetest.register_node("default:glass", {
1515         description = "Glass",
1516         drawtype = "glasslike_framed_optional",
1517         tiles = {"default_glass.png", "default_glass_detail.png"},
1518         inventory_image = minetest.inventorycube("default_glass.png"),
1519         paramtype = "light",
1520         sunlight_propagates = true,
1521         is_ground_content = false,
1522         groups = {cracky=3,oddly_breakable_by_hand=3},
1523         sounds = default.node_sound_glass_defaults(),
1524 })
1525
1526 minetest.register_node("default:obsidian_glass", {
1527         description = "Obsidian Glass",
1528         drawtype = "glasslike",
1529         tiles = {"default_obsidian_glass.png"},
1530         paramtype = "light",
1531         is_ground_content = false,
1532         sunlight_propagates = true,
1533         sounds = default.node_sound_glass_defaults(),
1534         groups = {cracky=3,oddly_breakable_by_hand=3},
1535 })
1536
1537
1538
1539 minetest.register_node("default:rail", {
1540         description = "Rail",
1541         drawtype = "raillike",
1542         tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
1543         inventory_image = "default_rail.png",
1544         wield_image = "default_rail.png",
1545         paramtype = "light",
1546         sunlight_propagates = true,
1547         walkable = false,
1548         is_ground_content = false,
1549         selection_box = {
1550                 type = "fixed",
1551                 -- but how to specify the dimensions for curved and sideways rails?
1552                 fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
1553         },
1554         groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("rail")},
1555 })
1556
1557
1558
1559 minetest.register_node("default:brick", {
1560         description = "Brick Block",
1561         tiles = {"default_brick.png"},
1562         is_ground_content = false,
1563         groups = {cracky=3},
1564         sounds = default.node_sound_stone_defaults(),
1565 })
1566
1567
1568 minetest.register_node("default:meselamp", {
1569         description = "Mese Lamp",
1570         drawtype = "glasslike",
1571         tiles = {"default_meselamp.png"},
1572         paramtype = "light",
1573         sunlight_propagates = true,
1574         is_ground_content = false,
1575         groups = {cracky = 3, oddly_breakable_by_hand = 3},
1576         sounds = default.node_sound_glass_defaults(),
1577         light_source = default.LIGHT_MAX,
1578 })
1579
1580 --
1581 -- Misc
1582 --
1583
1584 minetest.register_node("default:cloud", {
1585         description = "Cloud",
1586         tiles = {"default_cloud.png"},
1587         sounds = default.node_sound_defaults(),
1588         groups = {not_in_creative_inventory=1},
1589 })
1590
1591 minetest.register_node("default:nyancat", {
1592         description = "Nyan Cat",
1593         tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
1594                 "default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
1595         paramtype2 = "facedir",
1596         groups = {cracky=2},
1597         is_ground_content = false,
1598         legacy_facedir_simple = true,
1599         sounds = default.node_sound_defaults(),
1600 })
1601
1602 minetest.register_node("default:nyancat_rainbow", {
1603         description = "Nyan Cat Rainbow",
1604         tiles = {
1605                 "default_nc_rb.png^[transformR90", "default_nc_rb.png^[transformR90",
1606                 "default_nc_rb.png", "default_nc_rb.png"
1607         },
1608         paramtype2 = "facedir",
1609         groups = {cracky=2},
1610         is_ground_content = false,
1611         sounds = default.node_sound_defaults(),
1612 })