1 -- mods/default/nodes.lua
4 --[[ Node name convention:
6 Although many node names are in combined-word form, the required form for new
7 node names is words separated by underscores. If both forms are used in written
8 language (for example pinewood and pine wood) the underscore form should be used.
17 (1. Material 2. Cobble variant 3. Brick variant 4. Modified forms)
27 default:desert_stonebrick
28 default:desert_stone_block
31 default:sandstonebrick
32 default:sandstone_block
33 default:desert_sandstone
34 default:desert_sandstone_brick
35 default:desert_sandstone_block
36 default:silver_sandstone
37 default:silver_sandstone_brick
38 default:silver_sandstone_block
42 default:obsidian_block
46 (1. Material 2. Modified forms)
49 default:dirt_with_grass
50 default:dirt_with_grass_footsteps
51 default:dirt_with_dry_grass
52 default:dirt_with_snow
53 default:dirt_with_rainforest_litter
54 default:dirt_with_coniferous_litter
57 default:permafrost_with_stones
58 default:permafrost_with_moss
75 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
87 default:emergent_jungle_sapling
97 default:acacia_sapling
102 default:aspen_sapling
106 (1. In stone 2. Blocks)
108 default:stone_with_coal
111 default:stone_with_iron
114 default:stone_with_copper
117 default:stone_with_tin
122 default:stone_with_gold
125 default:stone_with_mese
128 default:stone_with_diamond
155 default:marram_grass_1
156 default:marram_grass_2
157 default:marram_grass_3
162 default:acacia_bush_stem
163 default:acacia_bush_leaves
164 default:acacia_bush_sapling
165 default:pine_bush_stem
166 default:pine_bush_needles
167 default:pine_bush_sapling
168 default:blueberry_bush_leaves_with_berries
169 default:blueberry_bush_leaves
170 default:blueberry_bush_sapling
172 default:sand_with_kelp
179 default:coral_skeleton
183 (1. Source 2. Flowing)
186 default:water_flowing
188 default:river_water_source
189 default:river_water_flowing
194 Tools / "Advanced" crafting / Non-"natural"
195 -------------------------------------------
199 default:sign_wall_wood
200 default:sign_wall_steel
206 default:fence_acacia_wood
207 default:fence_junglewood
208 default:fence_pine_wood
209 default:fence_aspen_wood
212 default:obsidian_glass
217 default:mese_post_light
230 minetest.register_node("default:stone", {
231 description = "Stone",
232 tiles = {"default_stone.png"},
233 groups = {cracky = 3, stone = 1},
234 drop = 'default:cobble',
235 legacy_mineral = true,
236 sounds = default.node_sound_stone_defaults(),
239 minetest.register_node("default:cobble", {
240 description = "Cobblestone",
241 tiles = {"default_cobble.png"},
242 is_ground_content = false,
243 groups = {cracky = 3, stone = 2},
244 sounds = default.node_sound_stone_defaults(),
247 minetest.register_node("default:stonebrick", {
248 description = "Stone Brick",
249 paramtype2 = "facedir",
251 tiles = {"default_stone_brick.png"},
252 is_ground_content = false,
253 groups = {cracky = 2, stone = 1},
254 sounds = default.node_sound_stone_defaults(),
257 minetest.register_node("default:stone_block", {
258 description = "Stone Block",
259 tiles = {"default_stone_block.png"},
260 is_ground_content = false,
261 groups = {cracky = 2, stone = 1},
262 sounds = default.node_sound_stone_defaults(),
265 minetest.register_node("default:mossycobble", {
266 description = "Mossy Cobblestone",
267 tiles = {"default_mossycobble.png"},
268 is_ground_content = false,
269 groups = {cracky = 3, stone = 1},
270 sounds = default.node_sound_stone_defaults(),
274 minetest.register_node("default:desert_stone", {
275 description = "Desert Stone",
276 tiles = {"default_desert_stone.png"},
277 groups = {cracky = 3, stone = 1},
278 drop = 'default:desert_cobble',
279 legacy_mineral = true,
280 sounds = default.node_sound_stone_defaults(),
283 minetest.register_node("default:desert_cobble", {
284 description = "Desert Cobblestone",
285 tiles = {"default_desert_cobble.png"},
286 is_ground_content = false,
287 groups = {cracky = 3, stone = 2},
288 sounds = default.node_sound_stone_defaults(),
291 minetest.register_node("default:desert_stonebrick", {
292 description = "Desert Stone Brick",
293 paramtype2 = "facedir",
295 tiles = {"default_desert_stone_brick.png"},
296 is_ground_content = false,
297 groups = {cracky = 2, stone = 1},
298 sounds = default.node_sound_stone_defaults(),
301 minetest.register_node("default:desert_stone_block", {
302 description = "Desert Stone Block",
303 tiles = {"default_desert_stone_block.png"},
304 is_ground_content = false,
305 groups = {cracky = 2, stone = 1},
306 sounds = default.node_sound_stone_defaults(),
309 minetest.register_node("default:sandstone", {
310 description = "Sandstone",
311 tiles = {"default_sandstone.png"},
312 groups = {crumbly = 1, cracky = 3},
313 sounds = default.node_sound_stone_defaults(),
316 minetest.register_node("default:sandstonebrick", {
317 description = "Sandstone Brick",
318 paramtype2 = "facedir",
320 tiles = {"default_sandstone_brick.png"},
321 is_ground_content = false,
322 groups = {cracky = 2},
323 sounds = default.node_sound_stone_defaults(),
326 minetest.register_node("default:sandstone_block", {
327 description = "Sandstone Block",
328 tiles = {"default_sandstone_block.png"},
329 is_ground_content = false,
330 groups = {cracky = 2},
331 sounds = default.node_sound_stone_defaults(),
334 minetest.register_node("default:desert_sandstone", {
335 description = "Desert Sandstone",
336 tiles = {"default_desert_sandstone.png"},
337 groups = {crumbly = 1, cracky = 3},
338 sounds = default.node_sound_stone_defaults(),
341 minetest.register_node("default:desert_sandstone_brick", {
342 description = "Desert Sandstone Brick",
343 paramtype2 = "facedir",
345 tiles = {"default_desert_sandstone_brick.png"},
346 is_ground_content = false,
347 groups = {cracky = 2},
348 sounds = default.node_sound_stone_defaults(),
351 minetest.register_node("default:desert_sandstone_block", {
352 description = "Desert Sandstone Block",
353 tiles = {"default_desert_sandstone_block.png"},
354 is_ground_content = false,
355 groups = {cracky = 2},
356 sounds = default.node_sound_stone_defaults(),
359 minetest.register_node("default:silver_sandstone", {
360 description = "Silver Sandstone",
361 tiles = {"default_silver_sandstone.png"},
362 groups = {crumbly = 1, cracky = 3},
363 sounds = default.node_sound_stone_defaults(),
366 minetest.register_node("default:silver_sandstone_brick", {
367 description = "Silver Sandstone Brick",
368 paramtype2 = "facedir",
370 tiles = {"default_silver_sandstone_brick.png"},
371 is_ground_content = false,
372 groups = {cracky = 2},
373 sounds = default.node_sound_stone_defaults(),
376 minetest.register_node("default:silver_sandstone_block", {
377 description = "Silver Sandstone Block",
378 tiles = {"default_silver_sandstone_block.png"},
379 is_ground_content = false,
380 groups = {cracky = 2},
381 sounds = default.node_sound_stone_defaults(),
384 minetest.register_node("default:obsidian", {
385 description = "Obsidian",
386 tiles = {"default_obsidian.png"},
387 sounds = default.node_sound_stone_defaults(),
388 groups = {cracky = 1, level = 2},
391 minetest.register_node("default:obsidianbrick", {
392 description = "Obsidian Brick",
393 paramtype2 = "facedir",
395 tiles = {"default_obsidian_brick.png"},
396 is_ground_content = false,
397 sounds = default.node_sound_stone_defaults(),
398 groups = {cracky = 1, level = 2},
401 minetest.register_node("default:obsidian_block", {
402 description = "Obsidian Block",
403 tiles = {"default_obsidian_block.png"},
404 is_ground_content = false,
405 sounds = default.node_sound_stone_defaults(),
406 groups = {cracky = 1, level = 2},
413 minetest.register_node("default:dirt", {
414 description = "Dirt",
415 tiles = {"default_dirt.png"},
416 groups = {crumbly = 3, soil = 1},
417 sounds = default.node_sound_dirt_defaults(),
420 minetest.register_node("default:dirt_with_grass", {
421 description = "Dirt with Grass",
422 tiles = {"default_grass.png", "default_dirt.png",
423 {name = "default_dirt.png^default_grass_side.png",
424 tileable_vertical = false}},
425 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
426 drop = 'default:dirt',
427 sounds = default.node_sound_dirt_defaults({
428 footstep = {name = "default_grass_footstep", gain = 0.25},
432 minetest.register_node("default:dirt_with_grass_footsteps", {
433 description = "Dirt with Grass and Footsteps",
434 tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
435 {name = "default_dirt.png^default_grass_side.png",
436 tileable_vertical = false}},
437 groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
438 drop = 'default:dirt',
439 sounds = default.node_sound_dirt_defaults({
440 footstep = {name = "default_grass_footstep", gain = 0.25},
444 minetest.register_node("default:dirt_with_dry_grass", {
445 description = "Dirt with Dry Grass",
446 tiles = {"default_dry_grass.png",
448 {name = "default_dirt.png^default_dry_grass_side.png",
449 tileable_vertical = false}},
450 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
451 drop = 'default:dirt',
452 sounds = default.node_sound_dirt_defaults({
453 footstep = {name = "default_grass_footstep", gain = 0.4},
457 minetest.register_node("default:dirt_with_snow", {
458 description = "Dirt with Snow",
459 tiles = {"default_snow.png", "default_dirt.png",
460 {name = "default_dirt.png^default_snow_side.png",
461 tileable_vertical = false}},
462 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
463 drop = 'default:dirt',
464 sounds = default.node_sound_dirt_defaults({
465 footstep = {name = "default_snow_footstep", gain = 0.2},
469 minetest.register_node("default:dirt_with_rainforest_litter", {
470 description = "Dirt with Rainforest Litter",
472 "default_rainforest_litter.png",
474 {name = "default_dirt.png^default_rainforest_litter_side.png",
475 tileable_vertical = false}
477 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
478 drop = "default:dirt",
479 sounds = default.node_sound_dirt_defaults({
480 footstep = {name = "default_grass_footstep", gain = 0.4},
484 minetest.register_node("default:dirt_with_coniferous_litter", {
485 description = "Dirt with Coniferous Litter",
487 "default_coniferous_litter.png",
489 {name = "default_dirt.png^default_coniferous_litter_side.png",
490 tileable_vertical = false}
492 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
493 drop = "default:dirt",
494 sounds = default.node_sound_dirt_defaults({
495 footstep = {name = "default_grass_footstep", gain = 0.4},
499 minetest.register_node("default:permafrost", {
500 description = "Permafrost",
501 tiles = {"default_permafrost.png"},
502 groups = {cracky = 3},
503 sounds = default.node_sound_dirt_defaults(),
506 minetest.register_node("default:permafrost_with_stones", {
507 description = "Permafrost with Stones",
508 tiles = {"default_permafrost.png^default_stones.png",
509 "default_permafrost.png"},
510 groups = {cracky = 3},
511 drop = "default:permafrost",
512 sounds = default.node_sound_gravel_defaults(),
515 minetest.register_node("default:permafrost_with_moss", {
516 description = "Permafrost with Moss",
517 tiles = {"default_moss.png", "default_permafrost.png",
518 {name = "default_permafrost.png^default_moss_side.png",
519 tileable_vertical = false}},
520 groups = {cracky = 3},
521 drop = "default:permafrost",
522 sounds = default.node_sound_dirt_defaults({
523 footstep = {name = "default_grass_footstep", gain = 0.25},
527 minetest.register_node("default:sand", {
528 description = "Sand",
529 tiles = {"default_sand.png"},
530 groups = {crumbly = 3, falling_node = 1, sand = 1},
531 sounds = default.node_sound_sand_defaults(),
534 minetest.register_node("default:desert_sand", {
535 description = "Desert Sand",
536 tiles = {"default_desert_sand.png"},
537 groups = {crumbly = 3, falling_node = 1, sand = 1},
538 sounds = default.node_sound_sand_defaults(),
541 minetest.register_node("default:silver_sand", {
542 description = "Silver Sand",
543 tiles = {"default_silver_sand.png"},
544 groups = {crumbly = 3, falling_node = 1, sand = 1},
545 sounds = default.node_sound_sand_defaults(),
549 minetest.register_node("default:gravel", {
550 description = "Gravel",
551 tiles = {"default_gravel.png"},
552 groups = {crumbly = 2, falling_node = 1},
553 sounds = default.node_sound_gravel_defaults(),
557 {items = {'default:flint'}, rarity = 16},
558 {items = {'default:gravel'}}
563 minetest.register_node("default:clay", {
564 description = "Clay",
565 tiles = {"default_clay.png"},
566 groups = {crumbly = 3},
567 drop = 'default:clay_lump 4',
568 sounds = default.node_sound_dirt_defaults(),
572 minetest.register_node("default:snow", {
573 description = "Snow",
574 tiles = {"default_snow.png"},
575 inventory_image = "default_snowball.png",
576 wield_image = "default_snowball.png",
580 drawtype = "nodebox",
584 {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
590 {-0.5, -0.5, -0.5, 0.5, -7 / 16, 0.5},
593 groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1, snowy = 1},
594 sounds = default.node_sound_snow_defaults(),
596 on_construct = function(pos)
598 if minetest.get_node(pos).name == "default:dirt_with_grass" then
599 minetest.set_node(pos, {name = "default:dirt_with_snow"})
604 minetest.register_node("default:snowblock", {
605 description = "Snow Block",
606 tiles = {"default_snow.png"},
607 groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1},
608 sounds = default.node_sound_snow_defaults(),
610 on_construct = function(pos)
612 if minetest.get_node(pos).name == "default:dirt_with_grass" then
613 minetest.set_node(pos, {name = "default:dirt_with_snow"})
618 -- 'is ground content = false' to avoid tunnels in sea ice or ice rivers
619 minetest.register_node("default:ice", {
621 tiles = {"default_ice.png"},
622 is_ground_content = false,
624 groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
625 sounds = default.node_sound_glass_defaults(),
628 -- Mapgen-placed ice with 'is ground content = true' to contain tunnels
629 minetest.register_node("default:cave_ice", {
630 description = "Cave Ice",
631 tiles = {"default_ice.png"},
633 groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3,
634 not_in_creative_inventory = 1},
635 drop = "default:ice",
636 sounds = default.node_sound_glass_defaults(),
643 minetest.register_node("default:tree", {
644 description = "Apple Tree",
645 tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
646 paramtype2 = "facedir",
647 is_ground_content = false,
648 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
649 sounds = default.node_sound_wood_defaults(),
651 on_place = minetest.rotate_node
654 minetest.register_node("default:wood", {
655 description = "Apple Wood Planks",
656 paramtype2 = "facedir",
658 tiles = {"default_wood.png"},
659 is_ground_content = false,
660 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
661 sounds = default.node_sound_wood_defaults(),
664 minetest.register_node("default:sapling", {
665 description = "Apple Tree Sapling",
666 drawtype = "plantlike",
667 tiles = {"default_sapling.png"},
668 inventory_image = "default_sapling.png",
669 wield_image = "default_sapling.png",
671 sunlight_propagates = true,
673 on_timer = default.grow_sapling,
676 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
678 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
679 attached_node = 1, sapling = 1},
680 sounds = default.node_sound_leaves_defaults(),
682 on_construct = function(pos)
683 minetest.get_node_timer(pos):start(math.random(300, 1500))
686 on_place = function(itemstack, placer, pointed_thing)
687 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
689 -- minp, maxp to be checked, relative to sapling pos
690 -- minp_relative.y = 1 because sapling pos has been checked
691 {x = -3, y = 1, z = -3},
692 {x = 3, y = 6, z = 3},
693 -- maximum interval of interior volume check
700 minetest.register_node("default:leaves", {
701 description = "Apple Tree Leaves",
702 drawtype = "allfaces_optional",
704 tiles = {"default_leaves.png"},
705 special_tiles = {"default_leaves_simple.png"},
707 is_ground_content = false,
708 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
713 -- player will get sapling with 1/20 chance
714 items = {'default:sapling'},
718 -- player will get leaves only if he get no saplings,
719 -- this is because max_items is 1
720 items = {'default:leaves'},
724 sounds = default.node_sound_leaves_defaults(),
726 after_place_node = default.after_place_leaves,
729 minetest.register_node("default:apple", {
730 description = "Apple",
731 drawtype = "plantlike",
732 tiles = {"default_apple.png"},
733 inventory_image = "default_apple.png",
735 sunlight_propagates = true,
737 is_ground_content = false,
740 fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
742 groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
743 leafdecay = 3, leafdecay_drop = 1, food_apple = 1},
744 on_use = minetest.item_eat(2),
745 sounds = default.node_sound_leaves_defaults(),
747 after_place_node = function(pos, placer, itemstack)
748 minetest.set_node(pos, {name = "default:apple", param2 = 1})
751 after_dig_node = function(pos, oldnode, oldmetadata, digger)
752 if oldnode.param2 == 0 then
753 minetest.set_node(pos, {name = "default:apple_mark"})
754 minetest.get_node_timer(pos):start(math.random(300, 1500))
759 minetest.register_node("default:apple_mark", {
760 description = "Apple Marker",
761 drawtype = "airlike",
763 sunlight_propagates = true,
769 groups = {not_in_creative_inventory = 1},
770 on_timer = function(pos, elapsed)
771 if not minetest.find_node_near(pos, 1, "default:leaves") then
772 minetest.remove_node(pos)
773 elseif minetest.get_node_light(pos) < 11 then
774 minetest.get_node_timer(pos):start(200)
776 minetest.set_node(pos, {name = "default:apple"})
782 minetest.register_node("default:jungletree", {
783 description = "Jungle Tree",
784 tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
785 "default_jungletree.png"},
786 paramtype2 = "facedir",
787 is_ground_content = false,
788 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
789 sounds = default.node_sound_wood_defaults(),
791 on_place = minetest.rotate_node
794 minetest.register_node("default:junglewood", {
795 description = "Jungle Wood Planks",
796 paramtype2 = "facedir",
798 tiles = {"default_junglewood.png"},
799 is_ground_content = false,
800 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
801 sounds = default.node_sound_wood_defaults(),
804 minetest.register_node("default:jungleleaves", {
805 description = "Jungle Tree Leaves",
806 drawtype = "allfaces_optional",
808 tiles = {"default_jungleleaves.png"},
809 special_tiles = {"default_jungleleaves_simple.png"},
811 is_ground_content = false,
812 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
816 {items = {'default:junglesapling'}, rarity = 20},
817 {items = {'default:jungleleaves'}}
820 sounds = default.node_sound_leaves_defaults(),
822 after_place_node = default.after_place_leaves,
825 minetest.register_node("default:junglesapling", {
826 description = "Jungle Tree Sapling",
827 drawtype = "plantlike",
828 tiles = {"default_junglesapling.png"},
829 inventory_image = "default_junglesapling.png",
830 wield_image = "default_junglesapling.png",
832 sunlight_propagates = true,
834 on_timer = default.grow_sapling,
837 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
839 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
840 attached_node = 1, sapling = 1},
841 sounds = default.node_sound_leaves_defaults(),
843 on_construct = function(pos)
844 minetest.get_node_timer(pos):start(math.random(300, 1500))
847 on_place = function(itemstack, placer, pointed_thing)
848 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
849 "default:junglesapling",
850 -- minp, maxp to be checked, relative to sapling pos
851 -- minp_relative.y = 1 because sapling pos has been checked
852 {x = -2, y = 1, z = -2},
853 {x = 2, y = 15, z = 2},
854 -- maximum interval of interior volume check
861 minetest.register_node("default:emergent_jungle_sapling", {
862 description = "Emergent Jungle Tree Sapling",
863 drawtype = "plantlike",
864 tiles = {"default_emergent_jungle_sapling.png"},
865 inventory_image = "default_emergent_jungle_sapling.png",
866 wield_image = "default_emergent_jungle_sapling.png",
868 sunlight_propagates = true,
870 on_timer = default.grow_sapling,
873 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
875 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
876 attached_node = 1, sapling = 1},
877 sounds = default.node_sound_leaves_defaults(),
879 on_construct = function(pos)
880 minetest.get_node_timer(pos):start(math.random(300, 1500))
883 on_place = function(itemstack, placer, pointed_thing)
884 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
885 "default:emergent_jungle_sapling",
886 -- minp, maxp to be checked, relative to sapling pos
887 {x = -3, y = -5, z = -3},
888 {x = 3, y = 31, z = 3},
889 -- maximum interval of interior volume check
897 minetest.register_node("default:pine_tree", {
898 description = "Pine Tree",
899 tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
900 "default_pine_tree.png"},
901 paramtype2 = "facedir",
902 is_ground_content = false,
903 groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
904 sounds = default.node_sound_wood_defaults(),
906 on_place = minetest.rotate_node
909 minetest.register_node("default:pine_wood", {
910 description = "Pine Wood Planks",
911 paramtype2 = "facedir",
913 tiles = {"default_pine_wood.png"},
914 is_ground_content = false,
915 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
916 sounds = default.node_sound_wood_defaults(),
919 minetest.register_node("default:pine_needles",{
920 description = "Pine Needles",
921 drawtype = "allfaces_optional",
922 tiles = {"default_pine_needles.png"},
925 is_ground_content = false,
926 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
930 {items = {"default:pine_sapling"}, rarity = 20},
931 {items = {"default:pine_needles"}}
934 sounds = default.node_sound_leaves_defaults(),
936 after_place_node = default.after_place_leaves,
939 minetest.register_node("default:pine_sapling", {
940 description = "Pine Tree Sapling",
941 drawtype = "plantlike",
942 tiles = {"default_pine_sapling.png"},
943 inventory_image = "default_pine_sapling.png",
944 wield_image = "default_pine_sapling.png",
946 sunlight_propagates = true,
948 on_timer = default.grow_sapling,
951 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
953 groups = {snappy = 2, dig_immediate = 3, flammable = 3,
954 attached_node = 1, sapling = 1},
955 sounds = default.node_sound_leaves_defaults(),
957 on_construct = function(pos)
958 minetest.get_node_timer(pos):start(math.random(300, 1500))
961 on_place = function(itemstack, placer, pointed_thing)
962 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
963 "default:pine_sapling",
964 -- minp, maxp to be checked, relative to sapling pos
965 -- minp_relative.y = 1 because sapling pos has been checked
966 {x = -2, y = 1, z = -2},
967 {x = 2, y = 14, z = 2},
968 -- maximum interval of interior volume check
976 minetest.register_node("default:acacia_tree", {
977 description = "Acacia Tree",
978 tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
979 "default_acacia_tree.png"},
980 paramtype2 = "facedir",
981 is_ground_content = false,
982 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
983 sounds = default.node_sound_wood_defaults(),
985 on_place = minetest.rotate_node
988 minetest.register_node("default:acacia_wood", {
989 description = "Acacia Wood Planks",
990 paramtype2 = "facedir",
992 tiles = {"default_acacia_wood.png"},
993 is_ground_content = false,
994 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
995 sounds = default.node_sound_wood_defaults(),
998 minetest.register_node("default:acacia_leaves", {
999 description = "Acacia Tree Leaves",
1000 drawtype = "allfaces_optional",
1001 tiles = {"default_acacia_leaves.png"},
1002 special_tiles = {"default_acacia_leaves_simple.png"},
1004 paramtype = "light",
1005 is_ground_content = false,
1006 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
1010 {items = {"default:acacia_sapling"}, rarity = 20},
1011 {items = {"default:acacia_leaves"}}
1014 sounds = default.node_sound_leaves_defaults(),
1016 after_place_node = default.after_place_leaves,
1019 minetest.register_node("default:acacia_sapling", {
1020 description = "Acacia Tree Sapling",
1021 drawtype = "plantlike",
1022 tiles = {"default_acacia_sapling.png"},
1023 inventory_image = "default_acacia_sapling.png",
1024 wield_image = "default_acacia_sapling.png",
1025 paramtype = "light",
1026 sunlight_propagates = true,
1028 on_timer = default.grow_sapling,
1031 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
1033 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1034 attached_node = 1, sapling = 1},
1035 sounds = default.node_sound_leaves_defaults(),
1037 on_construct = function(pos)
1038 minetest.get_node_timer(pos):start(math.random(300, 1500))
1041 on_place = function(itemstack, placer, pointed_thing)
1042 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1043 "default:acacia_sapling",
1044 -- minp, maxp to be checked, relative to sapling pos
1045 -- minp_relative.y = 1 because sapling pos has been checked
1046 {x = -4, y = 1, z = -4},
1047 {x = 4, y = 7, z = 4},
1048 -- maximum interval of interior volume check
1055 minetest.register_node("default:aspen_tree", {
1056 description = "Aspen Tree",
1057 tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png",
1058 "default_aspen_tree.png"},
1059 paramtype2 = "facedir",
1060 is_ground_content = false,
1061 groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
1062 sounds = default.node_sound_wood_defaults(),
1064 on_place = minetest.rotate_node
1067 minetest.register_node("default:aspen_wood", {
1068 description = "Aspen Wood Planks",
1069 paramtype2 = "facedir",
1071 tiles = {"default_aspen_wood.png"},
1072 is_ground_content = false,
1073 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
1074 sounds = default.node_sound_wood_defaults(),
1077 minetest.register_node("default:aspen_leaves", {
1078 description = "Aspen Tree Leaves",
1079 drawtype = "allfaces_optional",
1080 tiles = {"default_aspen_leaves.png"},
1082 paramtype = "light",
1083 is_ground_content = false,
1084 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
1088 {items = {"default:aspen_sapling"}, rarity = 20},
1089 {items = {"default:aspen_leaves"}}
1092 sounds = default.node_sound_leaves_defaults(),
1094 after_place_node = default.after_place_leaves,
1097 minetest.register_node("default:aspen_sapling", {
1098 description = "Aspen Tree Sapling",
1099 drawtype = "plantlike",
1100 tiles = {"default_aspen_sapling.png"},
1101 inventory_image = "default_aspen_sapling.png",
1102 wield_image = "default_aspen_sapling.png",
1103 paramtype = "light",
1104 sunlight_propagates = true,
1106 on_timer = default.grow_sapling,
1109 fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16}
1111 groups = {snappy = 2, dig_immediate = 3, flammable = 3,
1112 attached_node = 1, sapling = 1},
1113 sounds = default.node_sound_leaves_defaults(),
1115 on_construct = function(pos)
1116 minetest.get_node_timer(pos):start(math.random(300, 1500))
1119 on_place = function(itemstack, placer, pointed_thing)
1120 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1121 "default:aspen_sapling",
1122 -- minp, maxp to be checked, relative to sapling pos
1123 -- minp_relative.y = 1 because sapling pos has been checked
1124 {x = -2, y = 1, z = -2},
1125 {x = 2, y = 12, z = 2},
1126 -- maximum interval of interior volume check
1137 minetest.register_node("default:stone_with_coal", {
1138 description = "Coal Ore",
1139 tiles = {"default_stone.png^default_mineral_coal.png"},
1140 groups = {cracky = 3},
1141 drop = 'default:coal_lump',
1142 sounds = default.node_sound_stone_defaults(),
1145 minetest.register_node("default:coalblock", {
1146 description = "Coal Block",
1147 tiles = {"default_coal_block.png"},
1148 is_ground_content = false,
1149 groups = {cracky = 3},
1150 sounds = default.node_sound_stone_defaults(),
1154 minetest.register_node("default:stone_with_iron", {
1155 description = "Iron Ore",
1156 tiles = {"default_stone.png^default_mineral_iron.png"},
1157 groups = {cracky = 2},
1158 drop = 'default:iron_lump',
1159 sounds = default.node_sound_stone_defaults(),
1162 minetest.register_node("default:steelblock", {
1163 description = "Steel Block",
1164 tiles = {"default_steel_block.png"},
1165 is_ground_content = false,
1166 groups = {cracky = 1, level = 2},
1167 sounds = default.node_sound_metal_defaults(),
1171 minetest.register_node("default:stone_with_copper", {
1172 description = "Copper Ore",
1173 tiles = {"default_stone.png^default_mineral_copper.png"},
1174 groups = {cracky = 2},
1175 drop = 'default:copper_lump',
1176 sounds = default.node_sound_stone_defaults(),
1179 minetest.register_node("default:copperblock", {
1180 description = "Copper Block",
1181 tiles = {"default_copper_block.png"},
1182 is_ground_content = false,
1183 groups = {cracky = 1, level = 2},
1184 sounds = default.node_sound_metal_defaults(),
1188 minetest.register_node("default:stone_with_tin", {
1189 description = "Tin Ore",
1190 tiles = {"default_stone.png^default_mineral_tin.png"},
1191 groups = {cracky = 2},
1192 drop = "default:tin_lump",
1193 sounds = default.node_sound_stone_defaults(),
1196 minetest.register_node("default:tinblock", {
1197 description = "Tin Block",
1198 tiles = {"default_tin_block.png"},
1199 is_ground_content = false,
1200 groups = {cracky = 1, level = 2},
1201 sounds = default.node_sound_metal_defaults(),
1205 minetest.register_node("default:bronzeblock", {
1206 description = "Bronze Block",
1207 tiles = {"default_bronze_block.png"},
1208 is_ground_content = false,
1209 groups = {cracky = 1, level = 2},
1210 sounds = default.node_sound_metal_defaults(),
1214 minetest.register_node("default:stone_with_mese", {
1215 description = "Mese Ore",
1216 tiles = {"default_stone.png^default_mineral_mese.png"},
1217 groups = {cracky = 1},
1218 drop = "default:mese_crystal",
1219 sounds = default.node_sound_stone_defaults(),
1222 minetest.register_node("default:mese", {
1223 description = "Mese Block",
1224 tiles = {"default_mese_block.png"},
1225 paramtype = "light",
1226 groups = {cracky = 1, level = 2},
1227 sounds = default.node_sound_stone_defaults(),
1232 minetest.register_node("default:stone_with_gold", {
1233 description = "Gold Ore",
1234 tiles = {"default_stone.png^default_mineral_gold.png"},
1235 groups = {cracky = 2},
1236 drop = "default:gold_lump",
1237 sounds = default.node_sound_stone_defaults(),
1240 minetest.register_node("default:goldblock", {
1241 description = "Gold Block",
1242 tiles = {"default_gold_block.png"},
1243 is_ground_content = false,
1244 groups = {cracky = 1},
1245 sounds = default.node_sound_metal_defaults(),
1249 minetest.register_node("default:stone_with_diamond", {
1250 description = "Diamond Ore",
1251 tiles = {"default_stone.png^default_mineral_diamond.png"},
1252 groups = {cracky = 1},
1253 drop = "default:diamond",
1254 sounds = default.node_sound_stone_defaults(),
1257 minetest.register_node("default:diamondblock", {
1258 description = "Diamond Block",
1259 tiles = {"default_diamond_block.png"},
1260 is_ground_content = false,
1261 groups = {cracky = 1, level = 3},
1262 sounds = default.node_sound_stone_defaults(),
1266 -- Plantlife (non-cubic)
1269 minetest.register_node("default:cactus", {
1270 description = "Cactus",
1271 tiles = {"default_cactus_top.png", "default_cactus_top.png",
1272 "default_cactus_side.png"},
1273 paramtype2 = "facedir",
1274 groups = {choppy = 3},
1275 sounds = default.node_sound_wood_defaults(),
1276 on_place = minetest.rotate_node,
1279 minetest.register_node("default:papyrus", {
1280 description = "Papyrus",
1281 drawtype = "plantlike",
1282 tiles = {"default_papyrus.png"},
1283 inventory_image = "default_papyrus.png",
1284 wield_image = "default_papyrus.png",
1285 paramtype = "light",
1286 sunlight_propagates = true,
1290 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
1292 groups = {snappy = 3, flammable = 2},
1293 sounds = default.node_sound_leaves_defaults(),
1295 after_dig_node = function(pos, node, metadata, digger)
1296 default.dig_up(pos, node, digger)
1300 minetest.register_node("default:dry_shrub", {
1301 description = "Dry Shrub",
1302 drawtype = "plantlike",
1304 tiles = {"default_dry_shrub.png"},
1305 inventory_image = "default_dry_shrub.png",
1306 wield_image = "default_dry_shrub.png",
1307 paramtype = "light",
1308 paramtype2 = "meshoptions",
1310 sunlight_propagates = true,
1312 buildable_to = true,
1313 groups = {snappy = 3, flammable = 3, attached_node = 1},
1314 sounds = default.node_sound_leaves_defaults(),
1317 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16},
1321 minetest.register_node("default:junglegrass", {
1322 description = "Jungle Grass",
1323 drawtype = "plantlike",
1325 visual_scale = 1.69,
1326 tiles = {"default_junglegrass.png"},
1327 inventory_image = "default_junglegrass.png",
1328 wield_image = "default_junglegrass.png",
1329 paramtype = "light",
1330 sunlight_propagates = true,
1332 buildable_to = true,
1333 groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1},
1334 sounds = default.node_sound_leaves_defaults(),
1337 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
1342 minetest.register_node("default:grass_1", {
1343 description = "Grass",
1344 drawtype = "plantlike",
1346 tiles = {"default_grass_1.png"},
1347 -- Use texture of a taller grass stage in inventory
1348 inventory_image = "default_grass_3.png",
1349 wield_image = "default_grass_3.png",
1350 paramtype = "light",
1351 sunlight_propagates = true,
1353 buildable_to = true,
1354 groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
1355 sounds = default.node_sound_leaves_defaults(),
1358 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
1361 on_place = function(itemstack, placer, pointed_thing)
1362 -- place a random grass node
1363 local stack = ItemStack("default:grass_" .. math.random(1,5))
1364 local ret = minetest.item_place(stack, placer, pointed_thing)
1365 return ItemStack("default:grass_1 " ..
1366 itemstack:get_count() - (1 - ret:get_count()))
1371 minetest.register_node("default:grass_" .. i, {
1372 description = "Grass",
1373 drawtype = "plantlike",
1375 tiles = {"default_grass_" .. i .. ".png"},
1376 inventory_image = "default_grass_" .. i .. ".png",
1377 wield_image = "default_grass_" .. i .. ".png",
1378 paramtype = "light",
1379 sunlight_propagates = true,
1381 buildable_to = true,
1382 drop = "default:grass_1",
1383 groups = {snappy = 3, flora = 1, attached_node = 1,
1384 not_in_creative_inventory = 1, grass = 1, flammable = 1},
1385 sounds = default.node_sound_leaves_defaults(),
1388 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1394 minetest.register_node("default:dry_grass_1", {
1395 description = "Dry Grass",
1396 drawtype = "plantlike",
1398 tiles = {"default_dry_grass_1.png"},
1399 inventory_image = "default_dry_grass_3.png",
1400 wield_image = "default_dry_grass_3.png",
1401 paramtype = "light",
1402 sunlight_propagates = true,
1404 buildable_to = true,
1405 groups = {snappy = 3, flammable = 3, flora = 1,
1406 attached_node = 1, dry_grass = 1},
1407 sounds = default.node_sound_leaves_defaults(),
1410 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
1413 on_place = function(itemstack, placer, pointed_thing)
1414 -- place a random dry grass node
1415 local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
1416 local ret = minetest.item_place(stack, placer, pointed_thing)
1417 return ItemStack("default:dry_grass_1 " ..
1418 itemstack:get_count() - (1 - ret:get_count()))
1423 minetest.register_node("default:dry_grass_" .. i, {
1424 description = "Dry Grass",
1425 drawtype = "plantlike",
1427 tiles = {"default_dry_grass_" .. i .. ".png"},
1428 inventory_image = "default_dry_grass_" .. i .. ".png",
1429 wield_image = "default_dry_grass_" .. i .. ".png",
1430 paramtype = "light",
1431 sunlight_propagates = true,
1433 buildable_to = true,
1434 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1435 not_in_creative_inventory=1, dry_grass = 1},
1436 drop = "default:dry_grass_1",
1437 sounds = default.node_sound_leaves_defaults(),
1440 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16},
1446 minetest.register_node("default:fern_1", {
1447 description = "Fern",
1448 drawtype = "plantlike",
1450 tiles = {"default_fern_1.png"},
1451 inventory_image = "default_fern_1.png",
1452 wield_image = "default_fern_1.png",
1453 paramtype = "light",
1454 sunlight_propagates = true,
1456 buildable_to = true,
1457 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
1458 sounds = default.node_sound_leaves_defaults(),
1461 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1464 on_place = function(itemstack, placer, pointed_thing)
1465 -- place a random fern node
1466 local stack = ItemStack("default:fern_" .. math.random(1, 3))
1467 local ret = minetest.item_place(stack, placer, pointed_thing)
1468 return ItemStack("default:fern_1 " ..
1469 itemstack:get_count() - (1 - ret:get_count()))
1474 minetest.register_node("default:fern_" .. i, {
1475 description = "Fern",
1476 drawtype = "plantlike",
1479 tiles = {"default_fern_" .. i .. ".png"},
1480 inventory_image = "default_fern_" .. i .. ".png",
1481 wield_image = "default_fern_" .. i .. ".png",
1482 paramtype = "light",
1483 sunlight_propagates = true,
1485 buildable_to = true,
1486 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1487 not_in_creative_inventory=1},
1488 drop = "default:fern_1",
1489 sounds = default.node_sound_leaves_defaults(),
1492 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1498 minetest.register_node("default:marram_grass_1", {
1499 description = "Marram Grass",
1500 drawtype = "plantlike",
1502 tiles = {"default_marram_grass_1.png"},
1503 inventory_image = "default_marram_grass_1.png",
1504 wield_image = "default_marram_grass_1.png",
1505 paramtype = "light",
1506 sunlight_propagates = true,
1508 buildable_to = true,
1509 groups = {snappy = 3, flammable = 3, attached_node = 1},
1510 sounds = default.node_sound_leaves_defaults(),
1513 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1516 on_place = function(itemstack, placer, pointed_thing)
1517 -- place a random marram grass node
1518 local stack = ItemStack("default:marram_grass_" .. math.random(1, 3))
1519 local ret = minetest.item_place(stack, placer, pointed_thing)
1520 return ItemStack("default:marram_grass_1 " ..
1521 itemstack:get_count() - (1 - ret:get_count()))
1526 minetest.register_node("default:marram_grass_" .. i, {
1527 description = "Marram Grass",
1528 drawtype = "plantlike",
1530 tiles = {"default_marram_grass_" .. i .. ".png"},
1531 inventory_image = "default_marram_grass_" .. i .. ".png",
1532 wield_image = "default_marram_grass_" .. i .. ".png",
1533 paramtype = "light",
1534 sunlight_propagates = true,
1536 buildable_to = true,
1537 groups = {snappy = 3, flammable = 3, attached_node = 1,
1538 not_in_creative_inventory=1},
1539 drop = "default:marram_grass_1",
1540 sounds = default.node_sound_leaves_defaults(),
1543 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16},
1549 minetest.register_node("default:bush_stem", {
1550 description = "Bush Stem",
1551 drawtype = "plantlike",
1552 visual_scale = 1.41,
1553 tiles = {"default_bush_stem.png"},
1554 inventory_image = "default_bush_stem.png",
1555 wield_image = "default_bush_stem.png",
1556 paramtype = "light",
1557 sunlight_propagates = true,
1558 groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1559 sounds = default.node_sound_wood_defaults(),
1562 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1566 minetest.register_node("default:bush_leaves", {
1567 description = "Bush Leaves",
1568 drawtype = "allfaces_optional",
1570 tiles = {"default_leaves_simple.png"},
1571 paramtype = "light",
1572 groups = {snappy = 3, flammable = 2, leaves = 1},
1576 {items = {"default:bush_sapling"}, rarity = 5},
1577 {items = {"default:bush_leaves"}}
1580 sounds = default.node_sound_leaves_defaults(),
1582 after_place_node = default.after_place_leaves,
1585 minetest.register_node("default:bush_sapling", {
1586 description = "Bush Sapling",
1587 drawtype = "plantlike",
1588 tiles = {"default_bush_sapling.png"},
1589 inventory_image = "default_bush_sapling.png",
1590 wield_image = "default_bush_sapling.png",
1591 paramtype = "light",
1592 sunlight_propagates = true,
1594 on_timer = default.grow_sapling,
1597 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1599 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1600 attached_node = 1, sapling = 1},
1601 sounds = default.node_sound_leaves_defaults(),
1603 on_construct = function(pos)
1604 minetest.get_node_timer(pos):start(math.random(300, 1500))
1607 on_place = function(itemstack, placer, pointed_thing)
1608 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1609 "default:bush_sapling",
1610 -- minp, maxp to be checked, relative to sapling pos
1611 {x = -1, y = 0, z = -1},
1612 {x = 1, y = 1, z = 1},
1613 -- maximum interval of interior volume check
1620 minetest.register_node("default:blueberry_bush_leaves_with_berries", {
1621 description = "Blueberry Bush Leaves with Berries",
1622 drawtype = "allfaces_optional",
1624 tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"},
1625 paramtype = "light",
1626 groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 3},
1627 drop = "default:blueberries",
1628 sounds = default.node_sound_leaves_defaults(),
1629 node_dig_prediction = "default:blueberry_bush_leaves",
1631 after_dig_node = function(pos, oldnode, oldmetadata, digger)
1632 minetest.set_node(pos, {name = "default:blueberry_bush_leaves"})
1633 minetest.get_node_timer(pos):start(math.random(300, 1500))
1637 minetest.register_node("default:blueberry_bush_leaves", {
1638 description = "Blueberry Bush Leaves",
1639 drawtype = "allfaces_optional",
1641 tiles = {"default_blueberry_bush_leaves.png"},
1642 paramtype = "light",
1643 groups = {snappy = 3, flammable = 2, leaves = 1},
1647 {items = {"default:blueberry_bush_sapling"}, rarity = 5},
1648 {items = {"default:blueberry_bush_leaves"}}
1651 sounds = default.node_sound_leaves_defaults(),
1653 on_timer = function(pos, elapsed)
1654 if minetest.get_node_light(pos) < 11 then
1655 minetest.get_node_timer(pos):start(200)
1657 minetest.set_node(pos, {name = "default:blueberry_bush_leaves_with_berries"})
1661 after_place_node = default.after_place_leaves,
1664 minetest.register_node("default:blueberry_bush_sapling", {
1665 description = "Blueberry Bush Sapling",
1666 drawtype = "plantlike",
1667 tiles = {"default_blueberry_bush_sapling.png"},
1668 inventory_image = "default_blueberry_bush_sapling.png",
1669 wield_image = "default_blueberry_bush_sapling.png",
1670 paramtype = "light",
1671 sunlight_propagates = true,
1673 on_timer = default.grow_sapling,
1676 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1678 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1679 attached_node = 1, sapling = 1},
1680 sounds = default.node_sound_leaves_defaults(),
1682 on_construct = function(pos)
1683 minetest.get_node_timer(pos):start(math.random(300, 1500))
1686 on_place = function(itemstack, placer, pointed_thing)
1687 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1688 "default:blueberry_bush_sapling",
1689 -- minp, maxp to be checked, relative to sapling pos
1690 {x = -1, y = 0, z = -1},
1691 {x = 1, y = 1, z = 1},
1692 -- maximum interval of interior volume check
1699 minetest.register_node("default:acacia_bush_stem", {
1700 description = "Acacia Bush Stem",
1701 drawtype = "plantlike",
1702 visual_scale = 1.41,
1703 tiles = {"default_acacia_bush_stem.png"},
1704 inventory_image = "default_acacia_bush_stem.png",
1705 wield_image = "default_acacia_bush_stem.png",
1706 paramtype = "light",
1707 sunlight_propagates = true,
1708 groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1709 sounds = default.node_sound_wood_defaults(),
1712 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1716 minetest.register_node("default:acacia_bush_leaves", {
1717 description = "Acacia Bush Leaves",
1718 drawtype = "allfaces_optional",
1720 tiles = {"default_acacia_leaves_simple.png"},
1721 paramtype = "light",
1722 groups = {snappy = 3, flammable = 2, leaves = 1},
1726 {items = {"default:acacia_bush_sapling"}, rarity = 5},
1727 {items = {"default:acacia_bush_leaves"}}
1730 sounds = default.node_sound_leaves_defaults(),
1732 after_place_node = default.after_place_leaves,
1735 minetest.register_node("default:acacia_bush_sapling", {
1736 description = "Acacia Bush Sapling",
1737 drawtype = "plantlike",
1738 tiles = {"default_acacia_bush_sapling.png"},
1739 inventory_image = "default_acacia_bush_sapling.png",
1740 wield_image = "default_acacia_bush_sapling.png",
1741 paramtype = "light",
1742 sunlight_propagates = true,
1744 on_timer = default.grow_sapling,
1747 fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16}
1749 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1750 attached_node = 1, sapling = 1},
1751 sounds = default.node_sound_leaves_defaults(),
1753 on_construct = function(pos)
1754 minetest.get_node_timer(pos):start(math.random(300, 1500))
1757 on_place = function(itemstack, placer, pointed_thing)
1758 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1759 "default:acacia_bush_sapling",
1760 -- minp, maxp to be checked, relative to sapling pos
1761 {x = -1, y = 0, z = -1},
1762 {x = 1, y = 1, z = 1},
1763 -- maximum interval of interior volume check
1770 minetest.register_node("default:pine_bush_stem", {
1771 description = "Pine Bush Stem",
1772 drawtype = "plantlike",
1773 visual_scale = 1.41,
1774 tiles = {"default_pine_bush_stem.png"},
1775 inventory_image = "default_pine_bush_stem.png",
1776 wield_image = "default_pine_bush_stem.png",
1777 paramtype = "light",
1778 sunlight_propagates = true,
1779 groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
1780 sounds = default.node_sound_wood_defaults(),
1783 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
1787 minetest.register_node("default:pine_bush_needles", {
1788 description = "Pine Bush Needles",
1789 drawtype = "allfaces_optional",
1791 tiles = {"default_pine_needles.png"},
1792 paramtype = "light",
1793 groups = {snappy = 3, flammable = 2, leaves = 1},
1797 {items = {"default:pine_bush_sapling"}, rarity = 5},
1798 {items = {"default:pine_bush_needles"}}
1801 sounds = default.node_sound_leaves_defaults(),
1803 after_place_node = default.after_place_leaves,
1806 minetest.register_node("default:pine_bush_sapling", {
1807 description = "Pine Bush Sapling",
1808 drawtype = "plantlike",
1809 tiles = {"default_pine_bush_sapling.png"},
1810 inventory_image = "default_pine_bush_sapling.png",
1811 wield_image = "default_pine_bush_sapling.png",
1812 paramtype = "light",
1813 sunlight_propagates = true,
1815 on_timer = default.grow_sapling,
1818 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
1820 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
1821 attached_node = 1, sapling = 1},
1822 sounds = default.node_sound_leaves_defaults(),
1824 on_construct = function(pos)
1825 minetest.get_node_timer(pos):start(math.random(300, 1500))
1828 on_place = function(itemstack, placer, pointed_thing)
1829 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
1830 "default:pine_bush_sapling",
1831 -- minp, maxp to be checked, relative to sapling pos
1832 {x = -1, y = 0, z = -1},
1833 {x = 1, y = 1, z = 1},
1834 -- maximum interval of interior volume check
1841 minetest.register_node("default:sand_with_kelp", {
1842 description = "Kelp",
1843 drawtype = "plantlike_rooted",
1845 tiles = {"default_sand.png"},
1846 special_tiles = {{name = "default_kelp.png", tileable_vertical = true}},
1847 inventory_image = "default_kelp.png",
1848 paramtype = "light",
1849 paramtype2 = "leveled",
1850 groups = {snappy = 3},
1854 {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
1855 {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16},
1858 node_dig_prediction = "default:sand",
1859 node_placement_prediction = "",
1861 on_place = function(itemstack, placer, pointed_thing)
1862 -- Call on_rightclick if the pointed node defines it
1863 if pointed_thing.type == "node" and placer and
1864 not placer:get_player_control().sneak then
1865 local node_ptu = minetest.get_node(pointed_thing.under)
1866 local def_ptu = minetest.registered_nodes[node_ptu.name]
1867 if def_ptu and def_ptu.on_rightclick then
1868 return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer,
1869 itemstack, pointed_thing)
1873 local pos = pointed_thing.under
1874 if minetest.get_node(pos).name ~= "default:sand" then
1878 local height = math.random(4, 6)
1879 local pos_top = {x = pos.x, y = pos.y + height, z = pos.z}
1880 local node_top = minetest.get_node(pos_top)
1881 local def_top = minetest.registered_nodes[node_top.name]
1882 local player_name = placer:get_player_name()
1884 if def_top and def_top.liquidtype == "source" and
1885 minetest.get_item_group(node_top.name, "water") > 0 then
1886 if not minetest.is_protected(pos, player_name) and
1887 not minetest.is_protected(pos_top, player_name) then
1888 minetest.set_node(pos, {name = "default:sand_with_kelp",
1889 param2 = height * 16})
1890 if not (creative and creative.is_enabled_for
1891 and creative.is_enabled_for(player_name)) then
1892 itemstack:take_item()
1895 minetest.chat_send_player(player_name, "Node is protected")
1896 minetest.record_protection_violation(pos, player_name)
1903 after_destruct = function(pos, oldnode)
1904 minetest.set_node(pos, {name = "default:sand"})
1913 minetest.register_node("default:coral_brown", {
1914 description = "Brown Coral",
1915 tiles = {"default_coral_brown.png"},
1916 groups = {cracky = 3},
1917 drop = "default:coral_skeleton",
1918 sounds = default.node_sound_stone_defaults(),
1921 minetest.register_node("default:coral_orange", {
1922 description = "Orange Coral",
1923 tiles = {"default_coral_orange.png"},
1924 groups = {cracky = 3},
1925 drop = "default:coral_skeleton",
1926 sounds = default.node_sound_stone_defaults(),
1929 minetest.register_node("default:coral_skeleton", {
1930 description = "Coral Skeleton",
1931 tiles = {"default_coral_skeleton.png"},
1932 groups = {cracky = 3},
1933 sounds = default.node_sound_stone_defaults(),
1941 minetest.register_node("default:water_source", {
1942 description = "Water Source",
1943 drawtype = "liquid",
1946 name = "default_water_source_animated.png",
1947 backface_culling = false,
1949 type = "vertical_frames",
1956 name = "default_water_source_animated.png",
1957 backface_culling = true,
1959 type = "vertical_frames",
1967 paramtype = "light",
1971 buildable_to = true,
1972 is_ground_content = false,
1975 liquidtype = "source",
1976 liquid_alternative_flowing = "default:water_flowing",
1977 liquid_alternative_source = "default:water_source",
1978 liquid_viscosity = 1,
1979 post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1980 groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
1981 sounds = default.node_sound_water_defaults(),
1984 minetest.register_node("default:water_flowing", {
1985 description = "Flowing Water",
1986 drawtype = "flowingliquid",
1987 tiles = {"default_water.png"},
1990 name = "default_water_flowing_animated.png",
1991 backface_culling = false,
1993 type = "vertical_frames",
2000 name = "default_water_flowing_animated.png",
2001 backface_culling = true,
2003 type = "vertical_frames",
2011 paramtype = "light",
2012 paramtype2 = "flowingliquid",
2016 buildable_to = true,
2017 is_ground_content = false,
2020 liquidtype = "flowing",
2021 liquid_alternative_flowing = "default:water_flowing",
2022 liquid_alternative_source = "default:water_source",
2023 liquid_viscosity = 1,
2024 post_effect_color = {a = 103, r = 30, g = 60, b = 90},
2025 groups = {water = 3, liquid = 3, puts_out_fire = 1,
2026 not_in_creative_inventory = 1, cools_lava = 1},
2027 sounds = default.node_sound_water_defaults(),
2031 minetest.register_node("default:river_water_source", {
2032 description = "River Water Source",
2033 drawtype = "liquid",
2036 name = "default_river_water_source_animated.png",
2037 backface_culling = false,
2039 type = "vertical_frames",
2046 name = "default_river_water_source_animated.png",
2047 backface_culling = true,
2049 type = "vertical_frames",
2057 paramtype = "light",
2061 buildable_to = true,
2062 is_ground_content = false,
2065 liquidtype = "source",
2066 liquid_alternative_flowing = "default:river_water_flowing",
2067 liquid_alternative_source = "default:river_water_source",
2068 liquid_viscosity = 1,
2069 -- Not renewable to avoid horizontal spread of water sources in sloping
2070 -- rivers that can cause water to overflow riverbanks and cause floods.
2071 -- River water source is instead made renewable by the 'force renew'
2072 -- option used in the 'bucket' mod by the river water bucket.
2073 liquid_renewable = false,
2075 post_effect_color = {a = 103, r = 30, g = 76, b = 90},
2076 groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
2077 sounds = default.node_sound_water_defaults(),
2080 minetest.register_node("default:river_water_flowing", {
2081 description = "Flowing River Water",
2082 drawtype = "flowingliquid",
2083 tiles = {"default_river_water.png"},
2086 name = "default_river_water_flowing_animated.png",
2087 backface_culling = false,
2089 type = "vertical_frames",
2096 name = "default_river_water_flowing_animated.png",
2097 backface_culling = true,
2099 type = "vertical_frames",
2107 paramtype = "light",
2108 paramtype2 = "flowingliquid",
2112 buildable_to = true,
2113 is_ground_content = false,
2116 liquidtype = "flowing",
2117 liquid_alternative_flowing = "default:river_water_flowing",
2118 liquid_alternative_source = "default:river_water_source",
2119 liquid_viscosity = 1,
2120 liquid_renewable = false,
2122 post_effect_color = {a = 103, r = 30, g = 76, b = 90},
2123 groups = {water = 3, liquid = 3, puts_out_fire = 1,
2124 not_in_creative_inventory = 1, cools_lava = 1},
2125 sounds = default.node_sound_water_defaults(),
2129 minetest.register_node("default:lava_source", {
2130 description = "Lava Source",
2131 drawtype = "liquid",
2134 name = "default_lava_source_animated.png",
2135 backface_culling = false,
2137 type = "vertical_frames",
2144 name = "default_lava_source_animated.png",
2145 backface_culling = true,
2147 type = "vertical_frames",
2154 paramtype = "light",
2155 light_source = default.LIGHT_MAX - 1,
2159 buildable_to = true,
2160 is_ground_content = false,
2163 liquidtype = "source",
2164 liquid_alternative_flowing = "default:lava_flowing",
2165 liquid_alternative_source = "default:lava_source",
2166 liquid_viscosity = 7,
2167 liquid_renewable = false,
2168 damage_per_second = 4 * 2,
2169 post_effect_color = {a = 191, r = 255, g = 64, b = 0},
2170 groups = {lava = 3, liquid = 2, igniter = 1},
2173 minetest.register_node("default:lava_flowing", {
2174 description = "Flowing Lava",
2175 drawtype = "flowingliquid",
2176 tiles = {"default_lava.png"},
2179 name = "default_lava_flowing_animated.png",
2180 backface_culling = false,
2182 type = "vertical_frames",
2189 name = "default_lava_flowing_animated.png",
2190 backface_culling = true,
2192 type = "vertical_frames",
2199 paramtype = "light",
2200 paramtype2 = "flowingliquid",
2201 light_source = default.LIGHT_MAX - 1,
2205 buildable_to = true,
2206 is_ground_content = false,
2209 liquidtype = "flowing",
2210 liquid_alternative_flowing = "default:lava_flowing",
2211 liquid_alternative_source = "default:lava_source",
2212 liquid_viscosity = 7,
2213 liquid_renewable = false,
2214 damage_per_second = 4 * 2,
2215 post_effect_color = {a = 191, r = 255, g = 64, b = 0},
2216 groups = {lava = 3, liquid = 2, igniter = 1,
2217 not_in_creative_inventory = 1},
2221 -- Tools / "Advanced" crafting / Non-"natural"
2224 local bookshelf_formspec =
2227 default.gui_bg_img ..
2228 default.gui_slots ..
2229 "list[context;books;0,0.3;8,2;]" ..
2230 "list[current_player;main;0,2.85;8,1;]" ..
2231 "list[current_player;main;0,4.08;8,3;8]" ..
2232 "listring[context;books]" ..
2233 "listring[current_player;main]" ..
2234 default.get_hotbar_bg(0,2.85)
2236 local function update_bookshelf(pos)
2237 local meta = minetest.get_meta(pos)
2238 local inv = meta:get_inventory()
2239 local invlist = inv:get_list("books")
2241 local formspec = bookshelf_formspec
2242 -- Inventory slots overlay
2243 local bx, by = 0, 0.3
2244 local n_written, n_empty = 0, 0
2250 local stack = invlist[i]
2251 if stack:is_empty() then
2252 formspec = formspec ..
2253 "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"
2255 local metatable = stack:get_meta():to_table() or {}
2256 if metatable.fields and metatable.fields.text then
2257 n_written = n_written + stack:get_count()
2259 n_empty = n_empty + stack:get_count()
2264 meta:set_string("formspec", formspec)
2265 if n_written + n_empty == 0 then
2266 meta:set_string("infotext", "Empty Bookshelf")
2268 meta:set_string("infotext", "Bookshelf (" .. n_written ..
2269 " written, " .. n_empty .. " empty books)")
2273 minetest.register_node("default:bookshelf", {
2274 description = "Bookshelf",
2275 tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
2276 "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"},
2277 paramtype2 = "facedir",
2278 is_ground_content = false,
2279 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2280 sounds = default.node_sound_wood_defaults(),
2282 on_construct = function(pos)
2283 local meta = minetest.get_meta(pos)
2284 local inv = meta:get_inventory()
2285 inv:set_size("books", 8 * 2)
2286 update_bookshelf(pos)
2288 can_dig = function(pos,player)
2289 local inv = minetest.get_meta(pos):get_inventory()
2290 return inv:is_empty("books")
2292 allow_metadata_inventory_put = function(pos, listname, index, stack)
2293 if minetest.get_item_group(stack:get_name(), "book") ~= 0 then
2294 return stack:get_count()
2298 on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
2299 minetest.log("action", player:get_player_name() ..
2300 " moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
2301 update_bookshelf(pos)
2303 on_metadata_inventory_put = function(pos, listname, index, stack, player)
2304 minetest.log("action", player:get_player_name() ..
2305 " puts stuff to bookshelf at " .. minetest.pos_to_string(pos))
2306 update_bookshelf(pos)
2308 on_metadata_inventory_take = function(pos, listname, index, stack, player)
2309 minetest.log("action", player:get_player_name() ..
2310 " takes stuff from bookshelf at " .. minetest.pos_to_string(pos))
2311 update_bookshelf(pos)
2313 on_blast = function(pos)
2315 default.get_inventory_drops(pos, "books", drops)
2316 drops[#drops+1] = "default:bookshelf"
2317 minetest.remove_node(pos)
2322 local function register_sign(material, desc, def)
2323 minetest.register_node("default:sign_wall_" .. material, {
2324 description = desc .. " Sign",
2325 drawtype = "nodebox",
2326 tiles = {"default_sign_wall_" .. material .. ".png"},
2327 inventory_image = "default_sign_" .. material .. ".png",
2328 wield_image = "default_sign_" .. material .. ".png",
2329 paramtype = "light",
2330 paramtype2 = "wallmounted",
2331 sunlight_propagates = true,
2332 is_ground_content = false,
2335 type = "wallmounted",
2336 wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
2337 wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
2338 wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
2340 groups = def.groups,
2341 legacy_wallmounted = true,
2342 sounds = def.sounds,
2344 on_construct = function(pos)
2345 --local n = minetest.get_node(pos)
2346 local meta = minetest.get_meta(pos)
2347 meta:set_string("formspec", "field[text;;${text}]")
2349 on_receive_fields = function(pos, formname, fields, sender)
2350 --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
2351 local player_name = sender:get_player_name()
2352 if minetest.is_protected(pos, player_name) then
2353 minetest.record_protection_violation(pos, player_name)
2356 local meta = minetest.get_meta(pos)
2357 if not fields.text then return end
2358 minetest.log("action", (player_name or "") .. " wrote \"" ..
2359 fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
2360 meta:set_string("text", fields.text)
2361 meta:set_string("infotext", '"' .. fields.text .. '"')
2366 register_sign("wood", "Wooden", {
2367 sounds = default.node_sound_wood_defaults(),
2368 groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
2371 register_sign("steel", "Steel", {
2372 sounds = default.node_sound_metal_defaults(),
2373 groups = {cracky = 2, attached_node = 1}
2376 minetest.register_node("default:ladder_wood", {
2377 description = "Wooden Ladder",
2378 drawtype = "signlike",
2379 tiles = {"default_ladder_wood.png"},
2380 inventory_image = "default_ladder_wood.png",
2381 wield_image = "default_ladder_wood.png",
2382 paramtype = "light",
2383 paramtype2 = "wallmounted",
2384 sunlight_propagates = true,
2387 is_ground_content = false,
2389 type = "wallmounted",
2390 --wall_top = = <default>
2391 --wall_bottom = = <default>
2392 --wall_side = = <default>
2394 groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
2395 legacy_wallmounted = true,
2396 sounds = default.node_sound_wood_defaults(),
2399 minetest.register_node("default:ladder_steel", {
2400 description = "Steel Ladder",
2401 drawtype = "signlike",
2402 tiles = {"default_ladder_steel.png"},
2403 inventory_image = "default_ladder_steel.png",
2404 wield_image = "default_ladder_steel.png",
2405 paramtype = "light",
2406 paramtype2 = "wallmounted",
2407 sunlight_propagates = true,
2410 is_ground_content = false,
2412 type = "wallmounted",
2413 --wall_top = = <default>
2414 --wall_bottom = = <default>
2415 --wall_side = = <default>
2417 groups = {cracky = 2},
2418 sounds = default.node_sound_metal_defaults(),
2421 default.register_fence("default:fence_wood", {
2422 description = "Apple Wood Fence",
2423 texture = "default_fence_wood.png",
2424 inventory_image = "default_fence_overlay.png^default_wood.png^" ..
2425 "default_fence_overlay.png^[makealpha:255,126,126",
2426 wield_image = "default_fence_overlay.png^default_wood.png^" ..
2427 "default_fence_overlay.png^[makealpha:255,126,126",
2428 material = "default:wood",
2429 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2430 sounds = default.node_sound_wood_defaults()
2433 default.register_fence("default:fence_acacia_wood", {
2434 description = "Acacia Wood Fence",
2435 texture = "default_fence_acacia_wood.png",
2436 inventory_image = "default_fence_overlay.png^default_acacia_wood.png^" ..
2437 "default_fence_overlay.png^[makealpha:255,126,126",
2438 wield_image = "default_fence_overlay.png^default_acacia_wood.png^" ..
2439 "default_fence_overlay.png^[makealpha:255,126,126",
2440 material = "default:acacia_wood",
2441 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2442 sounds = default.node_sound_wood_defaults()
2445 default.register_fence("default:fence_junglewood", {
2446 description = "Jungle Wood Fence",
2447 texture = "default_fence_junglewood.png",
2448 inventory_image = "default_fence_overlay.png^default_junglewood.png^" ..
2449 "default_fence_overlay.png^[makealpha:255,126,126",
2450 wield_image = "default_fence_overlay.png^default_junglewood.png^" ..
2451 "default_fence_overlay.png^[makealpha:255,126,126",
2452 material = "default:junglewood",
2453 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2454 sounds = default.node_sound_wood_defaults()
2457 default.register_fence("default:fence_pine_wood", {
2458 description = "Pine Wood Fence",
2459 texture = "default_fence_pine_wood.png",
2460 inventory_image = "default_fence_overlay.png^default_pine_wood.png^" ..
2461 "default_fence_overlay.png^[makealpha:255,126,126",
2462 wield_image = "default_fence_overlay.png^default_pine_wood.png^" ..
2463 "default_fence_overlay.png^[makealpha:255,126,126",
2464 material = "default:pine_wood",
2465 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2466 sounds = default.node_sound_wood_defaults()
2469 default.register_fence("default:fence_aspen_wood", {
2470 description = "Aspen Wood Fence",
2471 texture = "default_fence_aspen_wood.png",
2472 inventory_image = "default_fence_overlay.png^default_aspen_wood.png^" ..
2473 "default_fence_overlay.png^[makealpha:255,126,126",
2474 wield_image = "default_fence_overlay.png^default_aspen_wood.png^" ..
2475 "default_fence_overlay.png^[makealpha:255,126,126",
2476 material = "default:aspen_wood",
2477 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2478 sounds = default.node_sound_wood_defaults()
2481 default.register_fence_rail("default:fence_rail_wood", {
2482 description = "Apple Wood Fence Rail",
2483 texture = "default_fence_rail_wood.png",
2484 inventory_image = "default_fence_rail_overlay.png^default_wood.png^" ..
2485 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2486 wield_image = "default_fence_rail_overlay.png^default_wood.png^" ..
2487 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2488 material = "default:wood",
2489 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2490 sounds = default.node_sound_wood_defaults()
2493 default.register_fence_rail("default:fence_rail_acacia_wood", {
2494 description = "Acacia Wood Fence Rail",
2495 texture = "default_fence_rail_acacia_wood.png",
2496 inventory_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" ..
2497 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2498 wield_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" ..
2499 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2500 material = "default:acacia_wood",
2501 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2502 sounds = default.node_sound_wood_defaults()
2505 default.register_fence_rail("default:fence_rail_junglewood", {
2506 description = "Jungle Wood Fence Rail",
2507 texture = "default_fence_rail_junglewood.png",
2508 inventory_image = "default_fence_rail_overlay.png^default_junglewood.png^" ..
2509 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2510 wield_image = "default_fence_rail_overlay.png^default_junglewood.png^" ..
2511 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2512 material = "default:junglewood",
2513 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2514 sounds = default.node_sound_wood_defaults()
2517 default.register_fence_rail("default:fence_rail_pine_wood", {
2518 description = "Pine Wood Fence Rail",
2519 texture = "default_fence_rail_pine_wood.png",
2520 inventory_image = "default_fence_rail_overlay.png^default_pine_wood.png^" ..
2521 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2522 wield_image = "default_fence_rail_overlay.png^default_pine_wood.png^" ..
2523 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2524 material = "default:pine_wood",
2525 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2526 sounds = default.node_sound_wood_defaults()
2529 default.register_fence_rail("default:fence_rail_aspen_wood", {
2530 description = "Aspen Wood Fence Rail",
2531 texture = "default_fence_rail_aspen_wood.png",
2532 inventory_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" ..
2533 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2534 wield_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" ..
2535 "default_fence_rail_overlay.png^[makealpha:255,126,126",
2536 material = "default:aspen_wood",
2537 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2},
2538 sounds = default.node_sound_wood_defaults()
2541 minetest.register_node("default:glass", {
2542 description = "Glass",
2543 drawtype = "glasslike_framed_optional",
2544 tiles = {"default_glass.png", "default_glass_detail.png"},
2545 paramtype = "light",
2546 paramtype2 = "glasslikeliquidlevel",
2547 sunlight_propagates = true,
2548 is_ground_content = false,
2549 groups = {cracky = 3, oddly_breakable_by_hand = 3},
2550 sounds = default.node_sound_glass_defaults(),
2553 minetest.register_node("default:obsidian_glass", {
2554 description = "Obsidian Glass",
2555 drawtype = "glasslike_framed_optional",
2556 tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
2557 paramtype = "light",
2558 paramtype2 = "glasslikeliquidlevel",
2559 is_ground_content = false,
2560 sunlight_propagates = true,
2561 sounds = default.node_sound_glass_defaults(),
2562 groups = {cracky = 3},
2566 minetest.register_node("default:brick", {
2567 description = "Brick Block",
2568 paramtype2 = "facedir",
2570 tiles = {"default_brick.png"},
2571 is_ground_content = false,
2572 groups = {cracky = 3},
2573 sounds = default.node_sound_stone_defaults(),
2577 minetest.register_node("default:meselamp", {
2578 description = "Mese Lamp",
2579 drawtype = "glasslike",
2580 tiles = {"default_meselamp.png"},
2581 paramtype = "light",
2582 sunlight_propagates = true,
2583 is_ground_content = false,
2584 groups = {cracky = 3, oddly_breakable_by_hand = 3},
2585 sounds = default.node_sound_glass_defaults(),
2586 light_source = default.LIGHT_MAX,
2589 minetest.register_node("default:mese_post_light", {
2590 description = "Mese Post Light",
2591 tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
2592 "default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
2593 "default_mese_post_light_side.png", "default_mese_post_light_side.png"},
2594 wield_image = "default_mese_post_light_side.png",
2595 drawtype = "nodebox",
2599 {-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
2602 paramtype = "light",
2603 light_source = default.LIGHT_MAX,
2604 sunlight_propagates = true,
2605 is_ground_content = false,
2606 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
2607 sounds = default.node_sound_wood_defaults(),
2614 minetest.register_node("default:cloud", {
2615 description = "Cloud",
2616 tiles = {"default_cloud.png"},
2617 is_ground_content = false,
2618 sounds = default.node_sound_defaults(),
2619 groups = {not_in_creative_inventory = 1},
2623 -- register trees for leafdecay
2626 if minetest.get_mapgen_setting("mg_name") == "v6" then
2627 default.register_leafdecay({
2628 trunks = {"default:tree"},
2629 leaves = {"default:apple", "default:leaves"},
2633 default.register_leafdecay({
2634 trunks = {"default:jungletree"},
2635 leaves = {"default:jungleleaves"},
2639 default.register_leafdecay({
2640 trunks = {"default:pine_tree"},
2641 leaves = {"default:pine_needles"},
2645 default.register_leafdecay({
2646 trunks = {"default:tree"},
2647 leaves = {"default:apple", "default:leaves"},
2651 default.register_leafdecay({
2652 trunks = {"default:jungletree"},
2653 leaves = {"default:jungleleaves"},
2657 default.register_leafdecay({
2658 trunks = {"default:pine_tree"},
2659 leaves = {"default:pine_needles"},
2664 default.register_leafdecay({
2665 trunks = {"default:acacia_tree"},
2666 leaves = {"default:acacia_leaves"},
2670 default.register_leafdecay({
2671 trunks = {"default:aspen_tree"},
2672 leaves = {"default:aspen_leaves"},
2676 default.register_leafdecay({
2677 trunks = {"default:bush_stem"},
2678 leaves = {"default:bush_leaves"},
2682 default.register_leafdecay({
2683 trunks = {"default:acacia_bush_stem"},
2684 leaves = {"default:acacia_bush_leaves"},
2688 default.register_leafdecay({
2689 trunks = {"default:pine_bush_stem"},
2690 leaves = {"default:pine_bush_needles"},