Give 24 rails per craft instead of 15
[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         walkable = false,
414         is_ground_content = true,
415         selection_box = {
416                 type = "fixed",
417                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
418         },
419         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
420         sounds = default.node_sound_leaves_defaults(),
421 })
422
423 minetest.register_node("default:leaves", {
424         description = "Leaves",
425         drawtype = "allfaces_optional",
426         waving = 1,
427         visual_scale = 1.3,
428         tiles = {"default_leaves.png"},
429         paramtype = "light",
430         is_ground_content = false,
431         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
432         drop = {
433                 max_items = 1,
434                 items = {
435                         {
436                                 -- player will get sapling with 1/20 chance
437                                 items = {'default:sapling'},
438                                 rarity = 20,
439                         },
440                         {
441                                 -- player will get leaves only if he get no saplings,
442                                 -- this is because max_items is 1
443                                 items = {'default:leaves'},
444                         }
445                 }
446         },
447         sounds = default.node_sound_leaves_defaults(),
448
449         after_place_node = default.after_place_leaves,
450 })
451
452 minetest.register_node("default:apple", {
453         description = "Apple",
454         drawtype = "plantlike",
455         visual_scale = 1.0,
456         tiles = {"default_apple.png"},
457         inventory_image = "default_apple.png",
458         paramtype = "light",
459         sunlight_propagates = true,
460         walkable = false,
461         is_ground_content = true,
462         selection_box = {
463                 type = "fixed",
464                 fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
465         },
466         groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
467         on_use = minetest.item_eat(1),
468         sounds = default.node_sound_leaves_defaults(),
469
470         after_place_node = function(pos, placer, itemstack)
471                 if placer:is_player() then
472                         minetest.set_node(pos, {name="default:apple", param2=1})
473                 end
474         end,
475 })
476
477
478
479 minetest.register_node("default:jungletree", {
480         description = "Jungle Tree",
481         tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
482         paramtype2 = "facedir",
483         is_ground_content = false,
484         groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
485         sounds = default.node_sound_wood_defaults(),
486
487         on_place = minetest.rotate_node
488 })
489
490 minetest.register_node("default:junglewood", {
491         description = "Junglewood Planks",
492         tiles = {"default_junglewood.png"},
493         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
494         sounds = default.node_sound_wood_defaults(),
495 })
496
497 minetest.register_node("default:jungleleaves", {
498         description = "Jungle Leaves",
499         drawtype = "allfaces_optional",
500         waving = 1,
501         visual_scale = 1.3,
502         tiles = {"default_jungleleaves.png"},
503         paramtype = "light",
504         is_ground_content = false,
505         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
506         drop = {
507                 max_items = 1,
508                 items = {
509                         {
510                                 -- player will get sapling with 1/20 chance
511                                 items = {'default:junglesapling'},
512                                 rarity = 20,
513                         },
514                         {
515                                 -- player will get leaves only if he get no saplings,
516                                 -- this is because max_items is 1
517                                 items = {'default:jungleleaves'},
518                         }
519                 }
520         },
521         sounds = default.node_sound_leaves_defaults(),
522
523         after_place_node = default.after_place_leaves,
524 })
525
526 minetest.register_node("default:junglesapling", {
527         description = "Jungle Sapling",
528         drawtype = "plantlike",
529         visual_scale = 1.0,
530         tiles = {"default_junglesapling.png"},
531         inventory_image = "default_junglesapling.png",
532         wield_image = "default_junglesapling.png",
533         paramtype = "light",
534         walkable = false,
535         selection_box = {
536                 type = "fixed",
537                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
538         },
539         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
540         sounds = default.node_sound_leaves_defaults(),
541 })
542
543
544
545 minetest.register_node("default:pinetree", {
546         description = "Pine Tree",
547         tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
548         paramtype2 = "facedir",
549         is_ground_content = false,
550         groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
551         sounds = default.node_sound_wood_defaults(),
552
553         on_place = minetest.rotate_node
554 })
555
556 minetest.register_node("default:pinewood", {
557         description = "Pinewood Planks",
558         tiles = {"default_pinewood.png"},
559         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
560         sounds = default.node_sound_wood_defaults(),
561 })
562
563 minetest.register_node("default:pine_needles",{
564         description = "Pine Needles",
565         drawtype = "allfaces_optional",
566         visual_scale = 1.3,
567         tiles = {"default_pine_needles.png"},
568         waving = 1,
569         paramtype = "light",
570         is_ground_content = false,
571         groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
572         drop = {
573                 max_items = 1,
574                 items = {
575                         {
576                                 -- player will get sapling with 1/20 chance
577                                 items = {"default:pine_sapling"},
578                                 rarity = 20,
579                         },
580                         {
581                                 -- player will get leaves only if he get no saplings,
582                                 -- this is because max_items is 1
583                                 items = {"default:pine_needles"},
584                         }
585                 }
586         },
587         sounds = default.node_sound_leaves_defaults(),
588
589         after_place_node = default.after_place_leaves,
590 })
591
592 minetest.register_node("default:pine_sapling", {
593         description = "Pine Sapling",
594         drawtype = "plantlike",
595         visual_scale = 1.0,
596         tiles = {"default_pine_sapling.png"},
597         inventory_image = "default_pine_sapling.png",
598         wield_image = "default_pine_sapling.png",
599         paramtype = "light",
600         walkable = false,
601         is_ground_content = true,
602         selection_box = {
603                 type = "fixed",
604                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
605         },
606         groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
607         sounds = default.node_sound_leaves_defaults(),
608 })
609
610 --
611 -- Ores
612 --
613
614 minetest.register_node("default:stone_with_coal", {
615         description = "Coal Ore",
616         tiles = {"default_stone.png^default_mineral_coal.png"},
617         is_ground_content = true,
618         groups = {cracky=3},
619         drop = 'default:coal_lump',
620         sounds = default.node_sound_stone_defaults(),
621 })
622
623 minetest.register_node("default:coalblock", {
624         description = "Coal Block",
625         tiles = {"default_coal_block.png"},
626         is_ground_content = true,
627         groups = {cracky=3},
628         sounds = default.node_sound_stone_defaults(),
629 })
630
631
632
633 minetest.register_node("default:stone_with_iron", {
634         description = "Iron Ore",
635         tiles = {"default_stone.png^default_mineral_iron.png"},
636         is_ground_content = true,
637         groups = {cracky=2},
638         drop = 'default:iron_lump',
639         sounds = default.node_sound_stone_defaults(),
640 })
641
642 minetest.register_node("default:steelblock", {
643         description = "Steel Block",
644         tiles = {"default_steel_block.png"},
645         is_ground_content = true,
646         groups = {cracky=1,level=2},
647         sounds = default.node_sound_stone_defaults(),
648 })
649
650
651
652 minetest.register_node("default:stone_with_copper", {
653         description = "Copper Ore",
654         tiles = {"default_stone.png^default_mineral_copper.png"},
655         is_ground_content = true,
656         groups = {cracky=2},
657         drop = 'default:copper_lump',
658         sounds = default.node_sound_stone_defaults(),
659 })
660
661 minetest.register_node("default:copperblock", {
662         description = "Copper Block",
663         tiles = {"default_copper_block.png"},
664         is_ground_content = true,
665         groups = {cracky=1,level=2},
666         sounds = default.node_sound_stone_defaults(),
667 })
668
669 minetest.register_node("default:bronzeblock", {
670         description = "Bronze Block",
671         tiles = {"default_bronze_block.png"},
672         is_ground_content = true,
673         groups = {cracky=1,level=2},
674         sounds = default.node_sound_stone_defaults(),
675 })
676
677
678
679 minetest.register_node("default:stone_with_mese", {
680         description = "Mese Ore",
681         tiles = {"default_stone.png^default_mineral_mese.png"},
682         paramtype = "light",
683         is_ground_content = true,
684         groups = {cracky = 1},
685         drop = "default:mese_crystal",
686         sounds = default.node_sound_stone_defaults(),
687         light_source = 1,
688 })
689
690 minetest.register_node("default:mese", {
691         description = "Mese Block",
692         tiles = {"default_mese_block.png"},
693         paramtype = "light",
694         is_ground_content = true,
695         groups = {cracky = 1, level = 2},
696         sounds = default.node_sound_stone_defaults(),
697         light_source = 3,
698 })
699
700
701
702
703 minetest.register_node("default:stone_with_gold", {
704         description = "Gold Ore",
705         tiles = {"default_stone.png^default_mineral_gold.png"},
706         is_ground_content = true,
707         groups = {cracky=2},
708         drop = "default:gold_lump",
709         sounds = default.node_sound_stone_defaults(),
710 })
711
712 minetest.register_node("default:goldblock", {
713         description = "Gold Block",
714         tiles = {"default_gold_block.png"},
715         is_ground_content = true,
716         groups = {cracky=1},
717         sounds = default.node_sound_stone_defaults(),
718 })
719
720
721
722 minetest.register_node("default:stone_with_diamond", {
723         description = "Diamond Ore",
724         tiles = {"default_stone.png^default_mineral_diamond.png"},
725         is_ground_content = true,
726         groups = {cracky=1},
727         drop = "default:diamond",
728         sounds = default.node_sound_stone_defaults(),
729 })
730
731 minetest.register_node("default:diamondblock", {
732         description = "Diamond Block",
733         tiles = {"default_diamond_block.png"},
734         is_ground_content = true,
735         groups = {cracky=1,level=3},
736         sounds = default.node_sound_stone_defaults(),
737 })
738
739 --
740 -- Plantlife (non-cubic)
741 --
742
743 minetest.register_node("default:cactus", {
744         description = "Cactus",
745         tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
746         paramtype2 = "facedir",
747         is_ground_content = true,
748         groups = {snappy=1,choppy=3,flammable=2},
749         sounds = default.node_sound_wood_defaults(),
750         on_place = minetest.rotate_node,
751
752         after_dig_node = function(pos, node, metadata, digger)
753                 default.dig_up(pos, node, digger)
754         end,
755 })
756
757 minetest.register_node("default:papyrus", {
758         description = "Papyrus",
759         drawtype = "plantlike",
760         tiles = {"default_papyrus.png"},
761         inventory_image = "default_papyrus.png",
762         wield_image = "default_papyrus.png",
763         paramtype = "light",
764         walkable = false,
765         is_ground_content = true,
766         selection_box = {
767                 type = "fixed",
768                 fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
769         },
770         groups = {snappy=3,flammable=2},
771         sounds = default.node_sound_leaves_defaults(),
772
773         after_dig_node = function(pos, node, metadata, digger)
774                 default.dig_up(pos, node, digger)
775         end,
776 })
777
778 minetest.register_node("default:dry_shrub", {
779         description = "Dry Shrub",
780         drawtype = "plantlike",
781         waving = 1,
782         visual_scale = 1.0,
783         tiles = {"default_dry_shrub.png"},
784         inventory_image = "default_dry_shrub.png",
785         wield_image = "default_dry_shrub.png",
786         paramtype = "light",
787         walkable = false,
788         is_ground_content = true,
789         buildable_to = true,
790         groups = {snappy=3,flammable=3,attached_node=1},
791         sounds = default.node_sound_leaves_defaults(),
792         selection_box = {
793                 type = "fixed",
794                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
795         },
796 })
797
798 minetest.register_node("default:junglegrass", {
799         description = "Jungle Grass",
800         drawtype = "plantlike",
801         waving = 1,
802         visual_scale = 1.3,
803         tiles = {"default_junglegrass.png"},
804         inventory_image = "default_junglegrass.png",
805         wield_image = "default_junglegrass.png",
806         paramtype = "light",
807         walkable = false,
808         buildable_to = true,
809         is_ground_content = true,
810         groups = {snappy=3,flammable=2,flora=1,attached_node=1},
811         sounds = default.node_sound_leaves_defaults(),
812         selection_box = {
813                 type = "fixed",
814                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
815         },
816 })
817
818 minetest.register_node("default:grass_1", {
819         description = "Grass",
820         drawtype = "plantlike",
821         waving = 1,
822         tiles = {"default_grass_1.png"},
823         -- Use texture of a taller grass stage in inventory
824         inventory_image = "default_grass_3.png",
825         wield_image = "default_grass_3.png",
826         paramtype = "light",
827         walkable = false,
828         is_ground_content = true,
829         buildable_to = true,
830         groups = {snappy=3,flammable=3,flora=1,attached_node=1},
831         sounds = default.node_sound_leaves_defaults(),
832         selection_box = {
833                 type = "fixed",
834                 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
835         },
836
837         on_place = function(itemstack, placer, pointed_thing)
838                 -- place a random grass node
839                 local stack = ItemStack("default:grass_"..math.random(1,5))
840                 local ret = minetest.item_place(stack, placer, pointed_thing)
841                 return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
842         end,
843 })
844
845 for i=2,5 do
846         minetest.register_node("default:grass_"..i, {
847                 description = "Grass",
848                 drawtype = "plantlike",
849                 waving = 1,
850                 tiles = {"default_grass_"..i..".png"},
851                 inventory_image = "default_grass_"..i..".png",
852                 wield_image = "default_grass_"..i..".png",
853                 paramtype = "light",
854                 walkable = false,
855                 buildable_to = true,
856                 is_ground_content = true,
857                 drop = "default:grass_1",
858                 groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
859                 sounds = default.node_sound_leaves_defaults(),
860                 selection_box = {
861                         type = "fixed",
862                         fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
863                 },
864         })
865 end
866
867 --
868 -- Liquids
869 --
870
871 minetest.register_node("default:water_source", {
872         description = "Water Source",
873         inventory_image = minetest.inventorycube("default_water.png"),
874         drawtype = "liquid",
875         tiles = {
876                 {
877                         name = "default_water_source_animated.png",
878                         animation = {
879                                 type = "vertical_frames",
880                                 aspect_w = 16,
881                                 aspect_h = 16,
882                                 length = 2.0,
883                         },
884                 },
885         },
886         special_tiles = {
887                 -- New-style water source material (mostly unused)
888                 {
889                         name = "default_water_source_animated.png",
890                         animation = {
891                                 type = "vertical_frames",
892                                 aspect_w = 16,
893                                 aspect_h = 16,
894                                 length = 2.0,
895                         },
896                         backface_culling = false,
897                 },
898         },
899         alpha = 160,
900         paramtype = "light",
901         walkable = false,
902         pointable = false,
903         diggable = false,
904         buildable_to = true,
905         is_ground_content = false,
906         drop = "",
907         drowning = 1,
908         liquidtype = "source",
909         liquid_alternative_flowing = "default:water_flowing",
910         liquid_alternative_source = "default:water_source",
911         liquid_viscosity = 1,
912         post_effect_color = {a=64, r=100, g=100, b=200},
913         groups = {water=3, liquid=3, puts_out_fire=1},
914 })
915
916 minetest.register_node("default:water_flowing", {
917         description = "Flowing Water",
918         inventory_image = minetest.inventorycube("default_water.png"),
919         drawtype = "flowingliquid",
920         tiles = {"default_water.png"},
921         special_tiles = {
922                 {
923                         name = "default_water_flowing_animated.png",
924                         backface_culling = false,
925                         animation = {
926                                 type = "vertical_frames",
927                                 aspect_w = 16,
928                                 aspect_h = 16,
929                                 length = 0.8,
930                         },
931                 },
932                 {
933                         name = "default_water_flowing_animated.png",
934                         backface_culling = true,
935                         animation = {
936                                 type = "vertical_frames",
937                                 aspect_w = 16,
938                                 aspect_h = 16,
939                                 length = 0.8,
940                         },
941                 },
942         },
943         alpha = 160,
944         paramtype = "light",
945         paramtype2 = "flowingliquid",
946         walkable = false,
947         pointable = false,
948         diggable = false,
949         buildable_to = true,
950         is_ground_content = false,
951         drop = "",
952         drowning = 1,
953         liquidtype = "flowing",
954         liquid_alternative_flowing = "default:water_flowing",
955         liquid_alternative_source = "default:water_source",
956         liquid_viscosity = 1,
957         post_effect_color = {a=64, r=100, g=100, b=200},
958         groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
959 })
960
961
962 minetest.register_node("default:river_water_source", {
963         description = "River Water Source",
964         inventory_image = minetest.inventorycube("default_water.png"),
965         drawtype = "liquid",
966         tiles = {
967                 {
968                         name = "default_water_source_animated.png",
969                         animation = {
970                                 type = "vertical_frames",
971                                 aspect_w = 16,
972                                 aspect_h = 16,
973                                 length = 2.0,
974                         },
975                 },
976         },
977         special_tiles = {
978                 {
979                         name = "default_water_source_animated.png",
980                         animation = {
981                                 type = "vertical_frames",
982                                 aspect_w = 16,
983                                 aspect_h = 16,
984                                 length = 2.0,
985                         },
986                         backface_culling = false,
987                 },
988         },
989         alpha = 160,
990         paramtype = "light",
991         walkable = false,
992         pointable = false,
993         diggable = false,
994         buildable_to = true,
995         is_ground_content = false,
996         drop = "",
997         drowning = 1,
998         liquidtype = "source",
999         liquid_alternative_flowing = "default:river_water_flowing",
1000         liquid_alternative_source = "default:river_water_source",
1001         liquid_viscosity = 1,
1002         liquid_renewable = false,
1003         liquid_range = 2,
1004         post_effect_color = {a=64, r=100, g=100, b=200},
1005         groups = {water=3, liquid=3, puts_out_fire=1},
1006 })
1007
1008 minetest.register_node("default:river_water_flowing", {
1009         description = "Flowing River Water",
1010         inventory_image = minetest.inventorycube("default_water.png"),
1011         drawtype = "flowingliquid",
1012         tiles = {"default_water.png"},
1013         special_tiles = {
1014                 {
1015                         name = "default_water_flowing_animated.png",
1016                         backface_culling = false,
1017                         animation = {
1018                                 type = "vertical_frames",
1019                                 aspect_w = 16,
1020                                 aspect_h = 16,
1021                                 length = 0.8,
1022                         },
1023                 },
1024                 {
1025                         name = "default_water_flowing_animated.png",
1026                         backface_culling = true,
1027                         animation = {
1028                                 type = "vertical_frames",
1029                                 aspect_w = 16,
1030                                 aspect_h = 16,
1031                                 length = 0.8,
1032                         },
1033                 },
1034         },
1035         alpha = 160,
1036         paramtype = "light",
1037         paramtype2 = "flowingliquid",
1038         walkable = false,
1039         pointable = false,
1040         diggable = false,
1041         buildable_to = true,
1042         is_ground_content = false,
1043         drop = "",
1044         drowning = 1,
1045         liquidtype = "flowing",
1046         liquid_alternative_flowing = "default:river_water_flowing",
1047         liquid_alternative_source = "default:river_water_source",
1048         liquid_viscosity = 1,
1049         liquid_renewable = false,
1050         liquid_range = 2,
1051         post_effect_color = {a=64, r=100, g=100, b=200},
1052         groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
1053 })
1054
1055
1056
1057 minetest.register_node("default:lava_source", {
1058         description = "Lava Source",
1059         inventory_image = minetest.inventorycube("default_lava.png"),
1060         drawtype = "liquid",
1061         tiles = {
1062                 {
1063                         name = "default_lava_source_animated.png",
1064                         animation = {
1065                                 type = "vertical_frames",
1066                                 aspect_w = 16,
1067                                 aspect_h = 16,
1068                                 length = 3.0,
1069                         },
1070                 },
1071         },
1072         special_tiles = {
1073                 -- New-style lava source material (mostly unused)
1074                 {
1075                         name = "default_lava_source_animated.png",
1076                         animation = {
1077                                 type = "vertical_frames",
1078                                 aspect_w = 16,
1079                                 aspect_h = 16,
1080                                 length = 3.0,
1081                         },
1082                         backface_culling = false,
1083                 },
1084         },
1085         paramtype = "light",
1086         light_source = default.LIGHT_MAX - 1,
1087         walkable = false,
1088         pointable = false,
1089         diggable = false,
1090         buildable_to = true,
1091         is_ground_content = false,
1092         drop = "",
1093         drowning = 1,
1094         liquidtype = "source",
1095         liquid_alternative_flowing = "default:lava_flowing",
1096         liquid_alternative_source = "default:lava_source",
1097         liquid_viscosity = 7,
1098         liquid_renewable = false,
1099         damage_per_second = 4 * 2,
1100         post_effect_color = {a=192, r=255, g=64, b=0},
1101         groups = {lava=3, liquid=2, hot=3, igniter=1},
1102 })
1103
1104 minetest.register_node("default:lava_flowing", {
1105         description = "Flowing Lava",
1106         inventory_image = minetest.inventorycube("default_lava.png"),
1107         drawtype = "flowingliquid",
1108         tiles = {"default_lava.png"},
1109         special_tiles = {
1110                 {
1111                         name = "default_lava_flowing_animated.png",
1112                         backface_culling = false,
1113                         animation = {
1114                                 type = "vertical_frames",
1115                                 aspect_w = 16,
1116                                 aspect_h = 16,
1117                                 length = 3.3,
1118                         },
1119                 },
1120                 {
1121                         name = "default_lava_flowing_animated.png",
1122                         backface_culling = true,
1123                         animation = {
1124                                 type = "vertical_frames",
1125                                 aspect_w = 16,
1126                                 aspect_h = 16,
1127                                 length = 3.3,
1128                         },
1129                 },
1130         },
1131         paramtype = "light",
1132         paramtype2 = "flowingliquid",
1133         light_source = default.LIGHT_MAX - 1,
1134         walkable = false,
1135         pointable = false,
1136         diggable = false,
1137         buildable_to = true,
1138         is_ground_content = false,
1139         drop = "",
1140         drowning = 1,
1141         liquidtype = "flowing",
1142         liquid_alternative_flowing = "default:lava_flowing",
1143         liquid_alternative_source = "default:lava_source",
1144         liquid_viscosity = 7,
1145         liquid_renewable = false,
1146         damage_per_second = 4 * 2,
1147         post_effect_color = {a=192, r=255, g=64, b=0},
1148         groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
1149 })
1150
1151 --
1152 -- Tools / "Advanced" crafting / Non-"natural"
1153 --
1154
1155 minetest.register_node("default:torch", {
1156         description = "Torch",
1157         drawtype = "torchlike",
1158         tiles = {
1159                 {
1160                         name = "default_torch_on_floor_animated.png",
1161                         animation = {
1162                                 type = "vertical_frames",
1163                                 aspect_w = 16,
1164                                 aspect_h = 16,
1165                                 length = 3.0
1166                         },
1167                 },
1168                 {
1169                         name="default_torch_on_ceiling_animated.png",
1170                         animation = {
1171                                 type = "vertical_frames",
1172                                 aspect_w = 16,
1173                                 aspect_h = 16,
1174                                 length = 3.0
1175                         },
1176                 },
1177                 {
1178                         name="default_torch_animated.png",
1179                         animation = {
1180                                 type = "vertical_frames",
1181                                 aspect_w = 16,
1182                                 aspect_h = 16,
1183                                 length = 3.0
1184                         },
1185                 },
1186         },
1187         inventory_image = "default_torch_on_floor.png",
1188         wield_image = "default_torch_on_floor.png",
1189         paramtype = "light",
1190         paramtype2 = "wallmounted",
1191         sunlight_propagates = true,
1192         is_ground_content = false,
1193         walkable = false,
1194         light_source = default.LIGHT_MAX - 1,
1195         selection_box = {
1196                 type = "wallmounted",
1197                 wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
1198                 wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
1199                 wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
1200         },
1201         groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1},
1202         legacy_wallmounted = true,
1203         sounds = default.node_sound_defaults(),
1204 })
1205
1206
1207
1208 local chest_formspec =
1209         "size[8,9]"..
1210         default.gui_bg..
1211         default.gui_bg_img..
1212         default.gui_slots..
1213         "list[current_name;main;0,0.3;8,4;]"..
1214         "list[current_player;main;0,4.85;8,1;]"..
1215         "list[current_player;main;0,6.08;8,3;8]"..
1216         default.get_hotbar_bg(0,4.85)
1217
1218 local function get_locked_chest_formspec(pos)
1219         local spos = pos.x .. "," .. pos.y .. "," ..pos.z
1220         local formspec =
1221                 "size[8,9]"..
1222                 default.gui_bg..
1223                 default.gui_bg_img..
1224                 default.gui_slots..
1225                 "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"..
1226                 "list[current_player;main;0,4.85;8,1;]"..
1227                 "list[current_player;main;0,6.08;8,3;8]"..
1228                 default.get_hotbar_bg(0,4.85)
1229  return formspec
1230 end
1231
1232 local function has_locked_chest_privilege(meta, player)
1233         if player:get_player_name() ~= meta:get_string("owner") then
1234                 return false
1235         end
1236         return true
1237 end
1238
1239 minetest.register_node("default:chest", {
1240         description = "Chest",
1241         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1242                 "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
1243         paramtype2 = "facedir",
1244         groups = {choppy=2,oddly_breakable_by_hand=2},
1245         legacy_facedir_simple = true,
1246         is_ground_content = false,
1247         sounds = default.node_sound_wood_defaults(),
1248
1249         on_construct = function(pos)
1250                 local meta = minetest.get_meta(pos)
1251                 meta:set_string("formspec", chest_formspec)
1252                 meta:set_string("infotext", "Chest")
1253                 local inv = meta:get_inventory()
1254                 inv:set_size("main", 8*4)
1255         end,
1256         can_dig = function(pos,player)
1257                 local meta = minetest.get_meta(pos);
1258                 local inv = meta:get_inventory()
1259                 return inv:is_empty("main")
1260         end,
1261         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1262                 minetest.log("action", player:get_player_name()..
1263                                 " moves stuff in chest at "..minetest.pos_to_string(pos))
1264         end,
1265     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1266                 minetest.log("action", player:get_player_name()..
1267                                 " moves stuff to chest at "..minetest.pos_to_string(pos))
1268         end,
1269     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1270                 minetest.log("action", player:get_player_name()..
1271                                 " takes stuff from chest at "..minetest.pos_to_string(pos))
1272         end,
1273 })
1274
1275
1276
1277 minetest.register_node("default:chest_locked", {
1278         description = "Locked Chest",
1279         tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1280                 "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
1281         paramtype2 = "facedir",
1282         groups = {choppy=2,oddly_breakable_by_hand=2},
1283         legacy_facedir_simple = true,
1284         is_ground_content = false,
1285         sounds = default.node_sound_wood_defaults(),
1286
1287         after_place_node = function(pos, placer)
1288                 local meta = minetest.get_meta(pos)
1289                 meta:set_string("owner", placer:get_player_name() or "")
1290                 meta:set_string("infotext", "Locked Chest (owned by "..
1291                                 meta:get_string("owner")..")")
1292         end,
1293         on_construct = function(pos)
1294                 local meta = minetest.get_meta(pos)
1295                 meta:set_string("infotext", "Locked Chest")
1296                 meta:set_string("owner", "")
1297                 local inv = meta:get_inventory()
1298                 inv:set_size("main", 8*4)
1299         end,
1300         can_dig = function(pos,player)
1301                 local meta = minetest.get_meta(pos);
1302                 local inv = meta:get_inventory()
1303                 return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
1304         end,
1305         allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1306                 local meta = minetest.get_meta(pos)
1307                 if not has_locked_chest_privilege(meta, player) then
1308                         return 0
1309                 end
1310                 return count
1311         end,
1312     allow_metadata_inventory_put = function(pos, listname, index, stack, 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 stack:get_count()
1318         end,
1319     allow_metadata_inventory_take = 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     on_metadata_inventory_put = function(pos, listname, index, stack, player)
1327                 minetest.log("action", player:get_player_name()..
1328                                 " moves stuff to locked chest at "..minetest.pos_to_string(pos))
1329         end,
1330     on_metadata_inventory_take = function(pos, listname, index, stack, player)
1331                 minetest.log("action", player:get_player_name()..
1332                                 " takes stuff from locked chest at "..minetest.pos_to_string(pos))
1333         end,
1334         on_rightclick = function(pos, node, clicker)
1335                 local meta = minetest.get_meta(pos)
1336                 if has_locked_chest_privilege(meta, clicker) then
1337                         minetest.show_formspec(
1338                                 clicker:get_player_name(),
1339                                 "default:chest_locked",
1340                                 get_locked_chest_formspec(pos)
1341                         )
1342                 end
1343         end,
1344         on_blast = function() end,
1345 })
1346
1347
1348
1349 local bookshelf_formspec =
1350         "size[8,7;]"..
1351         default.gui_bg..
1352         default.gui_bg_img..
1353         default.gui_slots..
1354         "list[context;books;0,0.3;8,2;]"..
1355         "list[current_player;main;0,2.85;8,1;]"..
1356         "list[current_player;main;0,4.08;8,3;8]"..
1357         default.get_hotbar_bg(0,2.85)
1358
1359 minetest.register_node("default:bookshelf", {
1360         description = "Bookshelf",
1361         tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"},
1362         is_ground_content = false,
1363         groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
1364         sounds = default.node_sound_wood_defaults(),
1365
1366         on_construct = function(pos)
1367                 local meta = minetest.get_meta(pos)
1368                 meta:set_string("formspec", bookshelf_formspec)
1369                 local inv = meta:get_inventory()
1370                 inv:set_size("books", 8*2)
1371         end,
1372         can_dig = function(pos,player)
1373                 local meta = minetest.get_meta(pos);
1374                 local inv = meta:get_inventory()
1375                 return inv:is_empty("books")
1376         end,
1377
1378         allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1379                 local meta = minetest.get_meta(pos)
1380                 local inv = meta:get_inventory()
1381                 local to_stack = inv:get_stack(listname, index)
1382                 if listname == "books" then
1383                         if minetest.get_item_group(stack:get_name(), "book") ~= 0
1384                                         and to_stack:is_empty() then
1385                                 return 1
1386                         else
1387                                 return 0
1388                         end
1389                 end
1390         end,
1391
1392         allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1393                 local meta = minetest.get_meta(pos)
1394                 local inv = meta:get_inventory()
1395                 local stack = inv:get_stack(from_list, from_index)
1396                 local to_stack = inv:get_stack(to_list, to_index)
1397                 if to_list == "books" then
1398                         if stack:get_name() == "default:book" and to_stack:is_empty() then
1399                                 return 1
1400                         else
1401                                 return 0
1402                         end
1403                 end
1404         end,
1405
1406         on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1407                 minetest.log("action", player:get_player_name()..
1408                            " moves stuff in bookshelf at "..minetest.pos_to_string(pos))
1409         end,
1410         on_metadata_inventory_put = function(pos, listname, index, stack, player)
1411                 minetest.log("action", player:get_player_name()..
1412                            " moves stuff to bookshelf at "..minetest.pos_to_string(pos))
1413         end,
1414         on_metadata_inventory_take = function(pos, listname, index, stack, player)
1415                 minetest.log("action", player:get_player_name()..
1416                            " takes stuff from bookshelf at "..minetest.pos_to_string(pos))
1417         end,
1418 })
1419
1420
1421
1422 minetest.register_node("default:sign_wall", {
1423         description = "Sign",
1424         drawtype = "nodebox",
1425         tiles = {"default_sign.png"},
1426         inventory_image = "default_sign_wall.png",
1427         wield_image = "default_sign_wall.png",
1428         paramtype = "light",
1429         paramtype2 = "wallmounted",
1430         sunlight_propagates = true,
1431         is_ground_content = false,
1432         walkable = false,
1433         node_box = {
1434                 type = "wallmounted",
1435                 wall_top    = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
1436                 wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
1437                 wall_side   = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
1438         },
1439         groups = {choppy=2,dig_immediate=2,attached_node=1},
1440         legacy_wallmounted = true,
1441         sounds = default.node_sound_defaults(),
1442
1443         on_construct = function(pos)
1444                 --local n = minetest.get_node(pos)
1445                 local meta = minetest.get_meta(pos)
1446                 meta:set_string("formspec", "field[text;;${text}]")
1447                 meta:set_string("infotext", "\"\"")
1448         end,
1449         on_receive_fields = function(pos, formname, fields, sender)
1450                 --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
1451                 if minetest.is_protected(pos, sender:get_player_name()) then
1452                         minetest.record_protection_violation(pos, sender:get_player_name())
1453                         return
1454                 end
1455                 local meta = minetest.get_meta(pos)
1456                 if not fields.text then return end
1457                 minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
1458                                 "\" to sign at "..minetest.pos_to_string(pos))
1459                 meta:set_string("text", fields.text)
1460                 meta:set_string("infotext", '"'..fields.text..'"')
1461         end,
1462 })
1463
1464 minetest.register_node("default:ladder", {
1465         description = "Ladder",
1466         drawtype = "signlike",
1467         tiles = {"default_ladder.png"},
1468         inventory_image = "default_ladder.png",
1469         wield_image = "default_ladder.png",
1470         paramtype = "light",
1471         paramtype2 = "wallmounted",
1472         walkable = false,
1473         climbable = true,
1474         is_ground_content = false,
1475         selection_box = {
1476                 type = "wallmounted",
1477                 --wall_top = = <default>
1478                 --wall_bottom = = <default>
1479                 --wall_side = = <default>
1480         },
1481         groups = {choppy=2,oddly_breakable_by_hand=3,flammable=2},
1482         legacy_wallmounted = true,
1483         sounds = default.node_sound_wood_defaults(),
1484 })
1485
1486 local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
1487 minetest.register_node("default:fence_wood", {
1488         description = "Wooden Fence",
1489         drawtype = "fencelike",
1490         tiles = {"default_wood.png"},
1491         inventory_image = fence_texture,
1492         wield_image = fence_texture,
1493         paramtype = "light",
1494         is_ground_content = false,
1495         selection_box = {
1496                 type = "fixed",
1497                 fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
1498         },
1499         groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
1500         sounds = default.node_sound_wood_defaults(),
1501 })
1502
1503
1504
1505 minetest.register_node("default:glass", {
1506         description = "Glass",
1507         drawtype = "glasslike_framed_optional",
1508         tiles = {"default_glass.png", "default_glass_detail.png"},
1509         inventory_image = minetest.inventorycube("default_glass.png"),
1510         paramtype = "light",
1511         sunlight_propagates = true,
1512         is_ground_content = false,
1513         groups = {cracky=3,oddly_breakable_by_hand=3},
1514         sounds = default.node_sound_glass_defaults(),
1515 })
1516
1517 minetest.register_node("default:obsidian_glass", {
1518         description = "Obsidian Glass",
1519         drawtype = "glasslike",
1520         tiles = {"default_obsidian_glass.png"},
1521         paramtype = "light",
1522         is_ground_content = false,
1523         sunlight_propagates = true,
1524         sounds = default.node_sound_glass_defaults(),
1525         groups = {cracky=3,oddly_breakable_by_hand=3},
1526 })
1527
1528
1529
1530 minetest.register_node("default:rail", {
1531         description = "Rail",
1532         drawtype = "raillike",
1533         tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
1534         inventory_image = "default_rail.png",
1535         wield_image = "default_rail.png",
1536         paramtype = "light",
1537         walkable = false,
1538         is_ground_content = false,
1539         selection_box = {
1540                 type = "fixed",
1541                 -- but how to specify the dimensions for curved and sideways rails?
1542                 fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
1543         },
1544         groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("rail")},
1545 })
1546
1547
1548
1549 minetest.register_node("default:brick", {
1550         description = "Brick Block",
1551         tiles = {"default_brick.png"},
1552         is_ground_content = false,
1553         groups = {cracky=3},
1554         sounds = default.node_sound_stone_defaults(),
1555 })
1556
1557
1558 minetest.register_node("default:meselamp", {
1559         description = "Mese Lamp",
1560         drawtype = "glasslike",
1561         tiles = {"default_meselamp.png"},
1562         paramtype = "light",
1563         sunlight_propagates = true,
1564         is_ground_content = false,
1565         groups = {cracky = 3, oddly_breakable_by_hand = 3},
1566         sounds = default.node_sound_glass_defaults(),
1567         light_source = default.LIGHT_MAX,
1568 })
1569
1570 --
1571 -- Misc
1572 --
1573
1574 minetest.register_node("default:cloud", {
1575         description = "Cloud",
1576         tiles = {"default_cloud.png"},
1577         sounds = default.node_sound_defaults(),
1578         groups = {not_in_creative_inventory=1},
1579 })
1580
1581 minetest.register_node("default:nyancat", {
1582         description = "Nyan Cat",
1583         tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
1584                 "default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
1585         paramtype2 = "facedir",
1586         groups = {cracky=2},
1587         is_ground_content = false,
1588         legacy_facedir_simple = true,
1589         sounds = default.node_sound_defaults(),
1590 })
1591
1592 minetest.register_node("default:nyancat_rainbow", {
1593         description = "Nyan Cat Rainbow",
1594         tiles = {
1595                 "default_nc_rb.png^[transformR90", "default_nc_rb.png^[transformR90",
1596                 "default_nc_rb.png", "default_nc_rb.png"
1597         },
1598         paramtype2 = "facedir",
1599         groups = {cracky=2},
1600         is_ground_content = false,
1601         sounds = default.node_sound_defaults(),
1602 })