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