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
36 default:obsidian_block
40 (1. Material 2. Modified forms)
43 default:dirt_with_grass
44 default:dirt_with_grass_footsteps
45 default:dirt_with_dry_grass
46 default:dirt_with_snow
63 (1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits)
84 default:acacia_sapling
93 (1. In stone 2. Blocks)
95 default:stone_with_coal
98 default:stone_with_iron
101 default:stone_with_copper
105 default:stone_with_gold
108 default:stone_with_mese
111 default:stone_with_diamond
139 default:coral_skeleton
143 (1. Source 2. Flowing)
146 default:water_flowing
148 default:river_water_source
149 default:river_water_flowing
154 Tools / "Advanced" crafting / Non-"natural"
155 -------------------------------------------
164 default:sign_wall_wood
165 default:sign_wall_steel
171 default:fence_acacia_wood
172 default:fence_junglewood
173 default:fence_pine_wood
174 default:fence_aspen_wood
177 default:obsidian_glass
196 minetest.register_node("default:stone", {
197 description = "Stone",
198 tiles = {"default_stone.png"},
199 groups = {cracky = 3, stone = 1},
200 drop = 'default:cobble',
201 legacy_mineral = true,
202 sounds = default.node_sound_stone_defaults(),
205 minetest.register_node("default:cobble", {
206 description = "Cobblestone",
207 tiles = {"default_cobble.png"},
208 is_ground_content = false,
209 groups = {cracky = 3, stone = 2},
210 sounds = default.node_sound_stone_defaults(),
213 minetest.register_node("default:stonebrick", {
214 description = "Stone Brick",
215 paramtype2 = "facedir",
217 tiles = {"default_stone_brick.png"},
218 is_ground_content = false,
219 groups = {cracky = 2, stone = 1},
220 sounds = default.node_sound_stone_defaults(),
223 minetest.register_node("default:stone_block", {
224 description = "Stone Block",
225 tiles = {"default_stone_block.png"},
226 is_ground_content = false,
227 groups = {cracky = 2, stone = 1},
228 sounds = default.node_sound_stone_defaults(),
231 minetest.register_node("default:mossycobble", {
232 description = "Mossy Cobblestone",
233 tiles = {"default_mossycobble.png"},
234 is_ground_content = false,
235 groups = {cracky = 3, stone = 1},
236 sounds = default.node_sound_stone_defaults(),
240 minetest.register_node("default:desert_stone", {
241 description = "Desert Stone",
242 tiles = {"default_desert_stone.png"},
243 groups = {cracky = 3, stone = 1},
244 drop = 'default:desert_cobble',
245 legacy_mineral = true,
246 sounds = default.node_sound_stone_defaults(),
249 minetest.register_node("default:desert_cobble", {
250 description = "Desert Cobblestone",
251 tiles = {"default_desert_cobble.png"},
252 is_ground_content = false,
253 groups = {cracky = 3, stone = 2},
254 sounds = default.node_sound_stone_defaults(),
257 minetest.register_node("default:desert_stonebrick", {
258 description = "Desert Stone Brick",
259 paramtype2 = "facedir",
261 tiles = {"default_desert_stone_brick.png"},
262 is_ground_content = false,
263 groups = {cracky = 2, stone = 1},
264 sounds = default.node_sound_stone_defaults(),
267 minetest.register_node("default:desert_stone_block", {
268 description = "Desert Stone Block",
269 tiles = {"default_desert_stone_block.png"},
270 is_ground_content = false,
271 groups = {cracky = 2, stone = 1},
272 sounds = default.node_sound_stone_defaults(),
276 minetest.register_node("default:sandstone", {
277 description = "Sandstone",
278 tiles = {"default_sandstone.png"},
279 groups = {crumbly = 1, cracky = 3},
280 sounds = default.node_sound_stone_defaults(),
283 minetest.register_node("default:sandstonebrick", {
284 description = "Sandstone Brick",
285 paramtype2 = "facedir",
287 tiles = {"default_sandstone_brick.png"},
288 is_ground_content = false,
289 groups = {cracky = 2},
290 sounds = default.node_sound_stone_defaults(),
293 minetest.register_node("default:sandstone_block", {
294 description = "Sandstone Block",
295 tiles = {"default_sandstone_block.png"},
296 is_ground_content = false,
297 groups = {cracky = 2},
298 sounds = default.node_sound_stone_defaults(),
302 minetest.register_node("default:obsidian", {
303 description = "Obsidian",
304 tiles = {"default_obsidian.png"},
305 sounds = default.node_sound_stone_defaults(),
306 groups = {cracky = 1, level = 2},
309 minetest.register_node("default:obsidianbrick", {
310 description = "Obsidian Brick",
311 paramtype2 = "facedir",
313 tiles = {"default_obsidian_brick.png"},
314 is_ground_content = false,
315 sounds = default.node_sound_stone_defaults(),
316 groups = {cracky = 1, level = 2},
319 minetest.register_node("default:obsidian_block", {
320 description = "Obsidian Block",
321 tiles = {"default_obsidian_block.png"},
322 is_ground_content = false,
323 sounds = default.node_sound_stone_defaults(),
324 groups = {cracky = 1, level = 2},
331 minetest.register_node("default:dirt", {
332 description = "Dirt",
333 tiles = {"default_dirt.png"},
334 groups = {crumbly = 3, soil = 1},
335 sounds = default.node_sound_dirt_defaults(),
338 minetest.register_node("default:dirt_with_grass", {
339 description = "Dirt with Grass",
340 tiles = {"default_grass.png", "default_dirt.png",
341 {name = "default_dirt.png^default_grass_side.png",
342 tileable_vertical = false}},
343 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
344 drop = 'default:dirt',
345 sounds = default.node_sound_dirt_defaults({
346 footstep = {name = "default_grass_footstep", gain = 0.25},
350 minetest.register_node("default:dirt_with_grass_footsteps", {
351 description = "Dirt with Grass and Footsteps",
352 tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
353 {name = "default_dirt.png^default_grass_side.png",
354 tileable_vertical = false}},
355 groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
356 drop = 'default:dirt',
357 sounds = default.node_sound_dirt_defaults({
358 footstep = {name = "default_grass_footstep", gain = 0.25},
362 minetest.register_node("default:dirt_with_dry_grass", {
363 description = "Dirt with Dry Grass",
364 tiles = {"default_dry_grass.png",
366 {name = "default_dirt.png^default_dry_grass_side.png",
367 tileable_vertical = false}},
368 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
369 drop = 'default:dirt',
370 sounds = default.node_sound_dirt_defaults({
371 footstep = {name = "default_grass_footstep", gain = 0.4},
375 minetest.register_node("default:dirt_with_snow", {
376 description = "Dirt with Snow",
377 tiles = {"default_snow.png", "default_dirt.png",
378 {name = "default_dirt.png^default_snow_side.png",
379 tileable_vertical = false}},
380 groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
381 drop = 'default:dirt',
382 sounds = default.node_sound_dirt_defaults({
383 footstep = {name = "default_snow_footstep", gain = 0.15},
387 minetest.register_node("default:sand", {
388 description = "Sand",
389 tiles = {"default_sand.png"},
390 groups = {crumbly = 3, falling_node = 1, sand = 1},
391 sounds = default.node_sound_sand_defaults(),
394 minetest.register_node("default:desert_sand", {
395 description = "Desert Sand",
396 tiles = {"default_desert_sand.png"},
397 groups = {crumbly = 3, falling_node = 1, sand = 1},
398 sounds = default.node_sound_sand_defaults(),
401 minetest.register_node("default:silver_sand", {
402 description = "Silver Sand",
403 tiles = {"default_silver_sand.png"},
404 groups = {crumbly = 3, falling_node = 1, sand = 1},
405 sounds = default.node_sound_sand_defaults(),
409 minetest.register_node("default:gravel", {
410 description = "Gravel",
411 tiles = {"default_gravel.png"},
412 groups = {crumbly = 2, falling_node = 1},
413 sounds = default.node_sound_gravel_defaults(),
417 {items = {'default:flint'}, rarity = 16},
418 {items = {'default:gravel'}}
423 minetest.register_node("default:clay", {
424 description = "Clay",
425 tiles = {"default_clay.png"},
426 groups = {crumbly = 3},
427 drop = 'default:clay_lump 4',
428 sounds = default.node_sound_dirt_defaults(),
432 minetest.register_node("default:snow", {
433 description = "Snow",
434 tiles = {"default_snow.png"},
435 inventory_image = "default_snowball.png",
436 wield_image = "default_snowball.png",
441 drawtype = "nodebox",
445 {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
448 groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1},
449 sounds = default.node_sound_dirt_defaults({
450 footstep = {name = "default_snow_footstep", gain = 0.15},
451 dug = {name = "default_snow_footstep", gain = 0.2},
452 dig = {name = "default_snow_footstep", gain = 0.2}
455 on_construct = function(pos)
457 if minetest.get_node(pos).name == "default:dirt_with_grass" then
458 minetest.set_node(pos, {name = "default:dirt_with_snow"})
463 minetest.register_node("default:snowblock", {
464 description = "Snow Block",
465 tiles = {"default_snow.png"},
466 groups = {crumbly = 3, puts_out_fire = 1},
467 sounds = default.node_sound_dirt_defaults({
468 footstep = {name = "default_snow_footstep", gain = 0.15},
469 dug = {name = "default_snow_footstep", gain = 0.2},
470 dig = {name = "default_snow_footstep", gain = 0.2}
474 minetest.register_node("default:ice", {
476 tiles = {"default_ice.png"},
477 is_ground_content = false,
479 groups = {cracky = 3, puts_out_fire = 1},
480 sounds = default.node_sound_glass_defaults(),
487 minetest.register_node("default:tree", {
488 description = "Tree",
489 tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
490 paramtype2 = "facedir",
491 is_ground_content = false,
492 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
493 sounds = default.node_sound_wood_defaults(),
495 on_place = minetest.rotate_node
498 minetest.register_node("default:wood", {
499 description = "Wooden Planks",
500 paramtype2 = "facedir",
502 tiles = {"default_wood.png"},
503 is_ground_content = false,
504 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
505 sounds = default.node_sound_wood_defaults(),
508 minetest.register_node("default:sapling", {
509 description = "Sapling",
510 drawtype = "plantlike",
512 tiles = {"default_sapling.png"},
513 inventory_image = "default_sapling.png",
514 wield_image = "default_sapling.png",
516 sunlight_propagates = true,
518 on_timer = default.grow_sapling,
521 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
523 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
524 attached_node = 1, sapling = 1},
525 sounds = default.node_sound_leaves_defaults(),
527 on_construct = function(pos)
528 minetest.get_node_timer(pos):start(math.random(2400,4800))
531 on_place = function(itemstack, placer, pointed_thing)
532 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
534 -- minp, maxp to be checked, relative to sapling pos
535 -- minp_relative.y = 1 because sapling pos has been checked
536 {x = -2, y = 1, z = -2},
537 {x = 2, y = 6, z = 2},
538 -- maximum interval of interior volume check
545 minetest.register_node("default:leaves", {
546 description = "Leaves",
547 drawtype = "allfaces_optional",
550 tiles = {"default_leaves.png"},
551 special_tiles = {"default_leaves_simple.png"},
553 is_ground_content = false,
554 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
559 -- player will get sapling with 1/20 chance
560 items = {'default:sapling'},
564 -- player will get leaves only if he get no saplings,
565 -- this is because max_items is 1
566 items = {'default:leaves'},
570 sounds = default.node_sound_leaves_defaults(),
572 after_place_node = default.after_place_leaves,
575 minetest.register_node("default:apple", {
576 description = "Apple",
577 drawtype = "plantlike",
579 tiles = {"default_apple.png"},
580 inventory_image = "default_apple.png",
582 sunlight_propagates = true,
584 is_ground_content = false,
587 fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
589 groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
590 leafdecay = 3, leafdecay_drop = 1},
591 on_use = minetest.item_eat(2),
592 sounds = default.node_sound_leaves_defaults(),
594 after_place_node = function(pos, placer, itemstack)
595 if placer:is_player() then
596 minetest.set_node(pos, {name = "default:apple", param2 = 1})
602 minetest.register_node("default:jungletree", {
603 description = "Jungle Tree",
604 tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
605 "default_jungletree.png"},
606 paramtype2 = "facedir",
607 is_ground_content = false,
608 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
609 sounds = default.node_sound_wood_defaults(),
611 on_place = minetest.rotate_node
614 minetest.register_node("default:junglewood", {
615 description = "Junglewood Planks",
616 paramtype2 = "facedir",
618 tiles = {"default_junglewood.png"},
619 is_ground_content = false,
620 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
621 sounds = default.node_sound_wood_defaults(),
624 minetest.register_node("default:jungleleaves", {
625 description = "Jungle Leaves",
626 drawtype = "allfaces_optional",
629 tiles = {"default_jungleleaves.png"},
630 special_tiles = {"default_jungleleaves_simple.png"},
632 is_ground_content = false,
633 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
637 {items = {'default:junglesapling'}, rarity = 20},
638 {items = {'default:jungleleaves'}}
641 sounds = default.node_sound_leaves_defaults(),
643 after_place_node = default.after_place_leaves,
646 minetest.register_node("default:junglesapling", {
647 description = "Jungle Sapling",
648 drawtype = "plantlike",
650 tiles = {"default_junglesapling.png"},
651 inventory_image = "default_junglesapling.png",
652 wield_image = "default_junglesapling.png",
654 sunlight_propagates = true,
656 on_timer = default.grow_sapling,
659 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
661 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
662 attached_node = 1, sapling = 1},
663 sounds = default.node_sound_leaves_defaults(),
665 on_construct = function(pos)
666 minetest.get_node_timer(pos):start(math.random(2400,4800))
669 on_place = function(itemstack, placer, pointed_thing)
670 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
671 "default:junglesapling",
672 -- minp, maxp to be checked, relative to sapling pos
673 -- minp_relative.y = 1 because sapling pos has been checked
674 {x = -2, y = 1, z = -2},
675 {x = 2, y = 15, z = 2},
676 -- maximum interval of interior volume check
684 minetest.register_node("default:pine_tree", {
685 description = "Pine Tree",
686 tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
687 "default_pine_tree.png"},
688 paramtype2 = "facedir",
689 is_ground_content = false,
690 groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
691 sounds = default.node_sound_wood_defaults(),
693 on_place = minetest.rotate_node
696 minetest.register_node("default:pine_wood", {
697 description = "Pine Wood Planks",
698 paramtype2 = "facedir",
700 tiles = {"default_pine_wood.png"},
701 is_ground_content = false,
702 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
703 sounds = default.node_sound_wood_defaults(),
706 minetest.register_node("default:pine_needles",{
707 description = "Pine Needles",
708 drawtype = "allfaces_optional",
710 tiles = {"default_pine_needles.png"},
713 is_ground_content = false,
714 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
718 {items = {"default:pine_sapling"}, rarity = 20},
719 {items = {"default:pine_needles"}}
722 sounds = default.node_sound_leaves_defaults(),
724 after_place_node = default.after_place_leaves,
727 minetest.register_node("default:pine_sapling", {
728 description = "Pine Sapling",
729 drawtype = "plantlike",
731 tiles = {"default_pine_sapling.png"},
732 inventory_image = "default_pine_sapling.png",
733 wield_image = "default_pine_sapling.png",
735 sunlight_propagates = true,
737 on_timer = default.grow_sapling,
740 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
742 groups = {snappy = 2, dig_immediate = 3, flammable = 3,
743 attached_node = 1, sapling = 1},
744 sounds = default.node_sound_leaves_defaults(),
746 on_construct = function(pos)
747 minetest.get_node_timer(pos):start(math.random(2400,4800))
750 on_place = function(itemstack, placer, pointed_thing)
751 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
752 "default:pine_sapling",
753 -- minp, maxp to be checked, relative to sapling pos
754 -- minp_relative.y = 1 because sapling pos has been checked
755 {x = -2, y = 1, z = -2},
756 {x = 2, y = 12, z = 2},
757 -- maximum interval of interior volume check
765 minetest.register_node("default:acacia_tree", {
766 description = "Acacia Tree",
767 tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
768 "default_acacia_tree.png"},
769 paramtype2 = "facedir",
770 is_ground_content = false,
771 groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
772 sounds = default.node_sound_wood_defaults(),
774 on_place = minetest.rotate_node
777 minetest.register_node("default:acacia_wood", {
778 description = "Acacia Wood Planks",
779 paramtype2 = "facedir",
781 tiles = {"default_acacia_wood.png"},
782 is_ground_content = false,
783 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
784 sounds = default.node_sound_wood_defaults(),
787 minetest.register_node("default:acacia_leaves", {
788 description = "Acacia Leaves",
789 drawtype = "allfaces_optional",
791 tiles = {"default_acacia_leaves.png"},
794 is_ground_content = false,
795 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
799 {items = {"default:acacia_sapling"}, rarity = 20},
800 {items = {"default:acacia_leaves"}}
803 sounds = default.node_sound_leaves_defaults(),
805 after_place_node = default.after_place_leaves,
808 minetest.register_node("default:acacia_sapling", {
809 description = "Acacia Tree Sapling",
810 drawtype = "plantlike",
812 tiles = {"default_acacia_sapling.png"},
813 inventory_image = "default_acacia_sapling.png",
814 wield_image = "default_acacia_sapling.png",
816 sunlight_propagates = true,
818 on_timer = default.grow_sapling,
821 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
823 groups = {snappy = 2, dig_immediate = 3, flammable = 2,
824 attached_node = 1, sapling = 1},
825 sounds = default.node_sound_leaves_defaults(),
827 on_construct = function(pos)
828 minetest.get_node_timer(pos):start(math.random(2400,4800))
831 on_place = function(itemstack, placer, pointed_thing)
832 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
833 "default:acacia_sapling",
834 -- minp, maxp to be checked, relative to sapling pos
835 -- minp_relative.y = 1 because sapling pos has been checked
836 {x = -4, y = 1, z = -4},
837 {x = 4, y = 6, z = 4},
838 -- maximum interval of interior volume check
845 minetest.register_node("default:aspen_tree", {
846 description = "Aspen Tree",
847 tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png",
848 "default_aspen_tree.png"},
849 paramtype2 = "facedir",
850 is_ground_content = false,
851 groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
852 sounds = default.node_sound_wood_defaults(),
854 on_place = minetest.rotate_node
857 minetest.register_node("default:aspen_wood", {
858 description = "Aspen Wood Planks",
859 paramtype2 = "facedir",
861 tiles = {"default_aspen_wood.png"},
862 is_ground_content = false,
863 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
864 sounds = default.node_sound_wood_defaults(),
867 minetest.register_node("default:aspen_leaves", {
868 description = "Aspen Leaves",
869 drawtype = "allfaces_optional",
871 tiles = {"default_aspen_leaves.png"},
874 is_ground_content = false,
875 groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
879 {items = {"default:aspen_sapling"}, rarity = 20},
880 {items = {"default:aspen_leaves"}}
883 sounds = default.node_sound_leaves_defaults(),
885 after_place_node = default.after_place_leaves,
888 minetest.register_node("default:aspen_sapling", {
889 description = "Aspen Tree Sapling",
890 drawtype = "plantlike",
892 tiles = {"default_aspen_sapling.png"},
893 inventory_image = "default_aspen_sapling.png",
894 wield_image = "default_aspen_sapling.png",
896 sunlight_propagates = true,
898 on_timer = default.grow_sapling,
901 fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
903 groups = {snappy = 2, dig_immediate = 3, flammable = 3,
904 attached_node = 1, sapling = 1},
905 sounds = default.node_sound_leaves_defaults(),
907 on_construct = function(pos)
908 minetest.get_node_timer(pos):start(math.random(2400,4800))
911 on_place = function(itemstack, placer, pointed_thing)
912 itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
913 "default:aspen_sapling",
914 -- minp, maxp to be checked, relative to sapling pos
915 -- minp_relative.y = 1 because sapling pos has been checked
916 {x = -2, y = 1, z = -2},
917 {x = 2, y = 12, z = 2},
918 -- maximum interval of interior volume check
929 minetest.register_node("default:stone_with_coal", {
930 description = "Coal Ore",
931 tiles = {"default_stone.png^default_mineral_coal.png"},
932 groups = {cracky = 3},
933 drop = 'default:coal_lump',
934 sounds = default.node_sound_stone_defaults(),
937 minetest.register_node("default:coalblock", {
938 description = "Coal Block",
939 tiles = {"default_coal_block.png"},
940 is_ground_content = false,
941 groups = {cracky = 3},
942 sounds = default.node_sound_stone_defaults(),
946 minetest.register_node("default:stone_with_iron", {
947 description = "Iron Ore",
948 tiles = {"default_stone.png^default_mineral_iron.png"},
949 groups = {cracky = 2},
950 drop = 'default:iron_lump',
951 sounds = default.node_sound_stone_defaults(),
954 minetest.register_node("default:steelblock", {
955 description = "Steel Block",
956 tiles = {"default_steel_block.png"},
957 is_ground_content = false,
958 groups = {cracky = 1, level = 2},
959 sounds = default.node_sound_stone_defaults(),
963 minetest.register_node("default:stone_with_copper", {
964 description = "Copper Ore",
965 tiles = {"default_stone.png^default_mineral_copper.png"},
966 groups = {cracky = 2},
967 drop = 'default:copper_lump',
968 sounds = default.node_sound_stone_defaults(),
971 minetest.register_node("default:copperblock", {
972 description = "Copper Block",
973 tiles = {"default_copper_block.png"},
974 is_ground_content = false,
975 groups = {cracky = 1, level = 2},
976 sounds = default.node_sound_stone_defaults(),
979 minetest.register_node("default:bronzeblock", {
980 description = "Bronze Block",
981 tiles = {"default_bronze_block.png"},
982 is_ground_content = false,
983 groups = {cracky = 1, level = 2},
984 sounds = default.node_sound_stone_defaults(),
988 minetest.register_node("default:stone_with_mese", {
989 description = "Mese Ore",
990 tiles = {"default_stone.png^default_mineral_mese.png"},
991 groups = {cracky = 1},
992 drop = "default:mese_crystal",
993 sounds = default.node_sound_stone_defaults(),
996 minetest.register_node("default:mese", {
997 description = "Mese Block",
998 tiles = {"default_mese_block.png"},
1000 groups = {cracky = 1, level = 2},
1001 sounds = default.node_sound_stone_defaults(),
1006 minetest.register_node("default:stone_with_gold", {
1007 description = "Gold Ore",
1008 tiles = {"default_stone.png^default_mineral_gold.png"},
1009 groups = {cracky = 2},
1010 drop = "default:gold_lump",
1011 sounds = default.node_sound_stone_defaults(),
1014 minetest.register_node("default:goldblock", {
1015 description = "Gold Block",
1016 tiles = {"default_gold_block.png"},
1017 is_ground_content = false,
1018 groups = {cracky = 1},
1019 sounds = default.node_sound_stone_defaults(),
1023 minetest.register_node("default:stone_with_diamond", {
1024 description = "Diamond Ore",
1025 tiles = {"default_stone.png^default_mineral_diamond.png"},
1026 groups = {cracky = 1},
1027 drop = "default:diamond",
1028 sounds = default.node_sound_stone_defaults(),
1031 minetest.register_node("default:diamondblock", {
1032 description = "Diamond Block",
1033 tiles = {"default_diamond_block.png"},
1034 is_ground_content = false,
1035 groups = {cracky = 1, level = 3},
1036 sounds = default.node_sound_stone_defaults(),
1040 -- Plantlife (non-cubic)
1043 minetest.register_node("default:cactus", {
1044 description = "Cactus",
1045 tiles = {"default_cactus_top.png", "default_cactus_top.png",
1046 "default_cactus_side.png"},
1047 paramtype2 = "facedir",
1048 groups = {snappy = 1, choppy = 3},
1049 sounds = default.node_sound_wood_defaults(),
1050 on_place = minetest.rotate_node,
1053 minetest.register_node("default:papyrus", {
1054 description = "Papyrus",
1055 drawtype = "plantlike",
1056 tiles = {"default_papyrus.png"},
1057 inventory_image = "default_papyrus.png",
1058 wield_image = "default_papyrus.png",
1059 paramtype = "light",
1060 sunlight_propagates = true,
1064 fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
1066 groups = {snappy = 3, flammable = 2},
1067 sounds = default.node_sound_leaves_defaults(),
1069 after_dig_node = function(pos, node, metadata, digger)
1070 default.dig_up(pos, node, digger)
1074 minetest.register_node("default:dry_shrub", {
1075 description = "Dry Shrub",
1076 drawtype = "plantlike",
1079 tiles = {"default_dry_shrub.png"},
1080 inventory_image = "default_dry_shrub.png",
1081 wield_image = "default_dry_shrub.png",
1082 paramtype = "light",
1083 sunlight_propagates = true,
1085 buildable_to = true,
1086 groups = {snappy = 3, flammable = 3, attached_node = 1},
1087 sounds = default.node_sound_leaves_defaults(),
1090 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1094 minetest.register_node("default:junglegrass", {
1095 description = "Jungle Grass",
1096 drawtype = "plantlike",
1099 tiles = {"default_junglegrass.png"},
1100 inventory_image = "default_junglegrass.png",
1101 wield_image = "default_junglegrass.png",
1102 paramtype = "light",
1103 sunlight_propagates = true,
1105 buildable_to = true,
1106 groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1},
1107 sounds = default.node_sound_leaves_defaults(),
1110 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1115 minetest.register_node("default:grass_1", {
1116 description = "Grass",
1117 drawtype = "plantlike",
1119 tiles = {"default_grass_1.png"},
1120 -- Use texture of a taller grass stage in inventory
1121 inventory_image = "default_grass_3.png",
1122 wield_image = "default_grass_3.png",
1123 paramtype = "light",
1124 sunlight_propagates = true,
1126 buildable_to = true,
1127 groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1},
1128 sounds = default.node_sound_leaves_defaults(),
1131 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1134 on_place = function(itemstack, placer, pointed_thing)
1135 -- place a random grass node
1136 local stack = ItemStack("default:grass_" .. math.random(1,5))
1137 local ret = minetest.item_place(stack, placer, pointed_thing)
1138 return ItemStack("default:grass_1 " ..
1139 itemstack:get_count() - (1 - ret:get_count()))
1144 minetest.register_node("default:grass_" .. i, {
1145 description = "Grass",
1146 drawtype = "plantlike",
1148 tiles = {"default_grass_" .. i .. ".png"},
1149 inventory_image = "default_grass_" .. i .. ".png",
1150 wield_image = "default_grass_" .. i .. ".png",
1151 paramtype = "light",
1152 sunlight_propagates = true,
1154 buildable_to = true,
1155 drop = "default:grass_1",
1156 groups = {snappy = 3, flora = 1, attached_node = 1,
1157 not_in_creative_inventory = 1, grass = 1},
1158 sounds = default.node_sound_leaves_defaults(),
1161 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1167 minetest.register_node("default:dry_grass_1", {
1168 description = "Dry Grass",
1169 drawtype = "plantlike",
1171 tiles = {"default_dry_grass_1.png"},
1172 inventory_image = "default_dry_grass_3.png",
1173 wield_image = "default_dry_grass_3.png",
1174 paramtype = "light",
1175 sunlight_propagates = true,
1177 buildable_to = true,
1178 groups = {snappy = 3, flammable = 3, flora = 1,
1179 attached_node = 1, dry_grass = 1},
1180 sounds = default.node_sound_leaves_defaults(),
1183 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1186 on_place = function(itemstack, placer, pointed_thing)
1187 -- place a random dry grass node
1188 local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
1189 local ret = minetest.item_place(stack, placer, pointed_thing)
1190 return ItemStack("default:dry_grass_1 " ..
1191 itemstack:get_count() - (1 - ret:get_count()))
1196 minetest.register_node("default:dry_grass_" .. i, {
1197 description = "Dry Grass",
1198 drawtype = "plantlike",
1200 tiles = {"default_dry_grass_" .. i .. ".png"},
1201 inventory_image = "default_dry_grass_" .. i .. ".png",
1202 wield_image = "default_dry_grass_" .. i .. ".png",
1203 paramtype = "light",
1204 sunlight_propagates = true,
1206 buildable_to = true,
1207 groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
1208 not_in_creative_inventory=1, dry_grass = 1},
1209 drop = "default:dry_grass_1",
1210 sounds = default.node_sound_leaves_defaults(),
1213 fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
1223 minetest.register_node("default:coral_brown", {
1224 description = "Brown Coral",
1225 tiles = {"default_coral_brown.png"},
1226 groups = {cracky = 3},
1227 drop = "default:coral_skeleton",
1228 sounds = default.node_sound_stone_defaults(),
1231 minetest.register_node("default:coral_orange", {
1232 description = "Orange Coral",
1233 tiles = {"default_coral_orange.png"},
1234 groups = {cracky = 3},
1235 drop = "default:coral_skeleton",
1236 sounds = default.node_sound_stone_defaults(),
1239 minetest.register_node("default:coral_skeleton", {
1240 description = "Coral Skeleton",
1241 tiles = {"default_coral_skeleton.png"},
1242 groups = {cracky = 3},
1243 sounds = default.node_sound_stone_defaults(),
1251 minetest.register_node("default:water_source", {
1252 description = "Water Source",
1253 drawtype = "liquid",
1256 name = "default_water_source_animated.png",
1258 type = "vertical_frames",
1266 -- New-style water source material (mostly unused)
1268 name = "default_water_source_animated.png",
1270 type = "vertical_frames",
1275 backface_culling = false,
1279 paramtype = "light",
1283 buildable_to = true,
1284 is_ground_content = false,
1287 liquidtype = "source",
1288 liquid_alternative_flowing = "default:water_flowing",
1289 liquid_alternative_source = "default:water_source",
1290 liquid_viscosity = 1,
1291 post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1292 groups = {water = 3, liquid = 3, puts_out_fire = 1},
1295 minetest.register_node("default:water_flowing", {
1296 description = "Flowing Water",
1297 drawtype = "flowingliquid",
1298 tiles = {"default_water.png"},
1301 name = "default_water_flowing_animated.png",
1302 backface_culling = false,
1304 type = "vertical_frames",
1311 name = "default_water_flowing_animated.png",
1312 backface_culling = true,
1314 type = "vertical_frames",
1322 paramtype = "light",
1323 paramtype2 = "flowingliquid",
1327 buildable_to = true,
1328 is_ground_content = false,
1331 liquidtype = "flowing",
1332 liquid_alternative_flowing = "default:water_flowing",
1333 liquid_alternative_source = "default:water_source",
1334 liquid_viscosity = 1,
1335 post_effect_color = {a = 103, r = 30, g = 60, b = 90},
1336 groups = {water = 3, liquid = 3, puts_out_fire = 1,
1337 not_in_creative_inventory = 1},
1341 minetest.register_node("default:river_water_source", {
1342 description = "River Water Source",
1343 drawtype = "liquid",
1346 name = "default_river_water_source_animated.png",
1348 type = "vertical_frames",
1357 name = "default_river_water_source_animated.png",
1359 type = "vertical_frames",
1364 backface_culling = false,
1368 paramtype = "light",
1372 buildable_to = true,
1373 is_ground_content = false,
1376 liquidtype = "source",
1377 liquid_alternative_flowing = "default:river_water_flowing",
1378 liquid_alternative_source = "default:river_water_source",
1379 liquid_viscosity = 1,
1380 liquid_renewable = false,
1382 post_effect_color = {a = 103, r = 30, g = 76, b = 90},
1383 groups = {water = 3, liquid = 3, puts_out_fire = 1},
1386 minetest.register_node("default:river_water_flowing", {
1387 description = "Flowing River Water",
1388 drawtype = "flowingliquid",
1389 tiles = {"default_river_water.png"},
1392 name = "default_river_water_flowing_animated.png",
1393 backface_culling = false,
1395 type = "vertical_frames",
1402 name = "default_river_water_flowing_animated.png",
1403 backface_culling = true,
1405 type = "vertical_frames",
1413 paramtype = "light",
1414 paramtype2 = "flowingliquid",
1418 buildable_to = true,
1419 is_ground_content = false,
1422 liquidtype = "flowing",
1423 liquid_alternative_flowing = "default:river_water_flowing",
1424 liquid_alternative_source = "default:river_water_source",
1425 liquid_viscosity = 1,
1426 liquid_renewable = false,
1428 post_effect_color = {a = 103, r = 30, g = 76, b = 90},
1429 groups = {water = 3, liquid = 3, puts_out_fire = 1,
1430 not_in_creative_inventory = 1},
1434 minetest.register_node("default:lava_source", {
1435 description = "Lava Source",
1436 drawtype = "liquid",
1439 name = "default_lava_source_animated.png",
1441 type = "vertical_frames",
1449 -- New-style lava source material (mostly unused)
1451 name = "default_lava_source_animated.png",
1453 type = "vertical_frames",
1458 backface_culling = false,
1461 paramtype = "light",
1462 light_source = default.LIGHT_MAX - 1,
1466 buildable_to = true,
1467 is_ground_content = false,
1470 liquidtype = "source",
1471 liquid_alternative_flowing = "default:lava_flowing",
1472 liquid_alternative_source = "default:lava_source",
1473 liquid_viscosity = 7,
1474 liquid_renewable = false,
1475 damage_per_second = 4 * 2,
1476 post_effect_color = {a = 191, r = 255, g = 64, b = 0},
1477 groups = {lava = 3, liquid = 2, igniter = 1},
1480 minetest.register_node("default:lava_flowing", {
1481 description = "Flowing Lava",
1482 drawtype = "flowingliquid",
1483 tiles = {"default_lava.png"},
1486 name = "default_lava_flowing_animated.png",
1487 backface_culling = false,
1489 type = "vertical_frames",
1496 name = "default_lava_flowing_animated.png",
1497 backface_culling = true,
1499 type = "vertical_frames",
1506 paramtype = "light",
1507 paramtype2 = "flowingliquid",
1508 light_source = default.LIGHT_MAX - 1,
1512 buildable_to = true,
1513 is_ground_content = false,
1516 liquidtype = "flowing",
1517 liquid_alternative_flowing = "default:lava_flowing",
1518 liquid_alternative_source = "default:lava_source",
1519 liquid_viscosity = 7,
1520 liquid_renewable = false,
1521 damage_per_second = 4 * 2,
1522 post_effect_color = {a = 191, r = 255, g = 64, b = 0},
1523 groups = {lava = 3, liquid = 2, igniter = 1,
1524 not_in_creative_inventory = 1},
1528 -- Tools / "Advanced" crafting / Non-"natural"
1531 minetest.register_node("default:torch", {
1532 description = "Torch",
1533 drawtype = "torchlike",
1536 name = "default_torch_on_floor_animated.png",
1538 type = "vertical_frames",
1545 name="default_torch_on_ceiling_animated.png",
1547 type = "vertical_frames",
1554 name="default_torch_animated.png",
1556 type = "vertical_frames",
1563 inventory_image = "default_torch_on_floor.png",
1564 wield_image = "default_torch_on_floor.png",
1565 paramtype = "light",
1566 paramtype2 = "wallmounted",
1567 sunlight_propagates = true,
1568 is_ground_content = false,
1570 light_source = default.LIGHT_MAX - 1,
1572 type = "wallmounted",
1573 wall_top = {-0.1, 0.5 - 0.6, -0.1, 0.1, 0.5, 0.1},
1574 wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5 + 0.6, 0.1},
1575 wall_side = {-0.5, -0.3, -0.1, -0.5 + 0.3, 0.3, 0.1},
1577 groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1},
1578 legacy_wallmounted = true,
1579 sounds = default.node_sound_defaults(),
1583 local chest_formspec =
1586 default.gui_bg_img ..
1587 default.gui_slots ..
1588 "list[current_name;main;0,0.3;8,4;]" ..
1589 "list[current_player;main;0,4.85;8,1;]" ..
1590 "list[current_player;main;0,6.08;8,3;8]" ..
1591 "listring[current_name;main]" ..
1592 "listring[current_player;main]" ..
1593 default.get_hotbar_bg(0,4.85)
1595 local function get_locked_chest_formspec(pos)
1596 local spos = pos.x .. "," .. pos.y .. "," .. pos.z
1600 default.gui_bg_img ..
1601 default.gui_slots ..
1602 "list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" ..
1603 "list[current_player;main;0,4.85;8,1;]" ..
1604 "list[current_player;main;0,6.08;8,3;8]" ..
1605 "listring[nodemeta:" .. spos .. ";main]" ..
1606 "listring[current_player;main]" ..
1607 default.get_hotbar_bg(0,4.85)
1611 local function has_locked_chest_privilege(meta, player)
1614 if minetest.check_player_privs(player, "protection_bypass") then
1617 name = player:get_player_name()
1619 if name ~= meta:get_string("owner") then
1625 minetest.register_node("default:chest", {
1626 description = "Chest",
1627 tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1628 "default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
1629 paramtype2 = "facedir",
1630 groups = {choppy = 2, oddly_breakable_by_hand = 2},
1631 legacy_facedir_simple = true,
1632 is_ground_content = false,
1633 sounds = default.node_sound_wood_defaults(),
1635 on_construct = function(pos)
1636 local meta = minetest.get_meta(pos)
1637 meta:set_string("formspec", chest_formspec)
1638 local inv = meta:get_inventory()
1639 inv:set_size("main", 8*4)
1641 can_dig = function(pos,player)
1642 local meta = minetest.get_meta(pos);
1643 local inv = meta:get_inventory()
1644 return inv:is_empty("main")
1646 on_metadata_inventory_move = function(pos, from_list, from_index,
1647 to_list, to_index, count, player)
1648 minetest.log("action", player:get_player_name() ..
1649 " moves stuff in chest at " .. minetest.pos_to_string(pos))
1651 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1652 minetest.log("action", player:get_player_name() ..
1653 " moves " .. stack:get_name() ..
1654 " to chest at " .. minetest.pos_to_string(pos))
1656 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1657 minetest.log("action", player:get_player_name() ..
1658 " takes " .. stack:get_name() ..
1659 " from chest at " .. minetest.pos_to_string(pos))
1661 on_blast = function(pos)
1663 default.get_inventory_drops(pos, "main", drops)
1664 drops[#drops+1] = "default:chest"
1665 minetest.remove_node(pos)
1670 minetest.register_node("default:chest_locked", {
1671 description = "Locked Chest",
1672 tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
1673 "default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
1674 paramtype2 = "facedir",
1675 groups = {choppy = 2, oddly_breakable_by_hand = 2},
1676 legacy_facedir_simple = true,
1677 is_ground_content = false,
1678 sounds = default.node_sound_wood_defaults(),
1680 after_place_node = function(pos, placer)
1681 local meta = minetest.get_meta(pos)
1682 meta:set_string("owner", placer:get_player_name() or "")
1683 meta:set_string("infotext", "Locked Chest (owned by " ..
1684 meta:get_string("owner") .. ")")
1686 on_construct = function(pos)
1687 local meta = minetest.get_meta(pos)
1688 meta:set_string("owner", "")
1689 local inv = meta:get_inventory()
1690 inv:set_size("main", 8 * 4)
1692 can_dig = function(pos,player)
1693 local meta = minetest.get_meta(pos);
1694 local inv = meta:get_inventory()
1695 return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
1697 allow_metadata_inventory_move = function(pos, from_list, from_index,
1698 to_list, to_index, count, player)
1699 local meta = minetest.get_meta(pos)
1700 if not has_locked_chest_privilege(meta, player) then
1705 allow_metadata_inventory_put = function(pos, listname, index, stack, player)
1706 local meta = minetest.get_meta(pos)
1707 if not has_locked_chest_privilege(meta, player) then
1710 return stack:get_count()
1712 allow_metadata_inventory_take = function(pos, listname, index, stack, player)
1713 local meta = minetest.get_meta(pos)
1714 if not has_locked_chest_privilege(meta, player) then
1717 return stack:get_count()
1719 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1720 minetest.log("action", player:get_player_name() ..
1721 " moves " .. stack:get_name() ..
1722 " to locked chest at " .. minetest.pos_to_string(pos))
1724 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1725 minetest.log("action", player:get_player_name() ..
1726 " takes " .. stack:get_name() ..
1727 " from locked chest at " .. minetest.pos_to_string(pos))
1729 on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
1730 local meta = minetest.get_meta(pos)
1731 if has_locked_chest_privilege(meta, clicker) then
1732 minetest.show_formspec(
1733 clicker:get_player_name(),
1734 "default:chest_locked",
1735 get_locked_chest_formspec(pos)
1740 on_blast = function() end,
1744 local bookshelf_formspec =
1747 default.gui_bg_img ..
1748 default.gui_slots ..
1749 "list[context;books;0,0.3;8,2;]" ..
1750 "list[current_player;main;0,2.85;8,1;]" ..
1751 "list[current_player;main;0,4.08;8,3;8]" ..
1752 "listring[context;books]" ..
1753 "listring[current_player;main]" ..
1754 default.get_hotbar_bg(0,2.85)
1756 minetest.register_node("default:bookshelf", {
1757 description = "Bookshelf",
1758 tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
1759 "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"},
1760 paramtype2 = "facedir",
1761 is_ground_content = false,
1762 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
1763 sounds = default.node_sound_wood_defaults(),
1765 on_construct = function(pos)
1766 local meta = minetest.get_meta(pos)
1767 meta:set_string("formspec", bookshelf_formspec)
1768 local inv = meta:get_inventory()
1769 inv:set_size("books", 8 * 2)
1771 can_dig = function(pos,player)
1772 local inv = minetest.get_meta(pos):get_inventory()
1773 return inv:is_empty("books")
1775 allow_metadata_inventory_put = function(pos, listname, index, stack)
1776 if minetest.get_item_group(stack:get_name(), "book") ~= 0 then
1777 return stack:get_count()
1781 on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
1782 minetest.log("action", player:get_player_name() ..
1783 " moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
1785 on_metadata_inventory_put = function(pos, listname, index, stack, player)
1786 minetest.log("action", player:get_player_name() ..
1787 " moves stuff to bookshelf at " .. minetest.pos_to_string(pos))
1789 on_metadata_inventory_take = function(pos, listname, index, stack, player)
1790 minetest.log("action", player:get_player_name() ..
1791 " takes stuff from bookshelf at " .. minetest.pos_to_string(pos))
1793 on_blast = function(pos)
1795 default.get_inventory_drops(pos, "books", drops)
1796 drops[#drops+1] = "default:bookshelf"
1797 minetest.remove_node(pos)
1802 local function register_sign(material, desc, def)
1803 minetest.register_node("default:sign_wall_" .. material, {
1804 description = desc .. " Sign",
1805 drawtype = "nodebox",
1806 tiles = {"default_sign_wall_" .. material .. ".png"},
1807 inventory_image = "default_sign_" .. material .. ".png",
1808 wield_image = "default_sign_" .. material .. ".png",
1809 paramtype = "light",
1810 paramtype2 = "wallmounted",
1811 sunlight_propagates = true,
1812 is_ground_content = false,
1815 type = "wallmounted",
1816 wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
1817 wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
1818 wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375},
1820 groups = def.groups,
1821 legacy_wallmounted = true,
1822 sounds = def.sounds,
1824 on_construct = function(pos)
1825 --local n = minetest.get_node(pos)
1826 local meta = minetest.get_meta(pos)
1827 meta:set_string("formspec", "field[text;;${text}]")
1829 on_receive_fields = function(pos, formname, fields, sender)
1830 --print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
1831 local player_name = sender:get_player_name()
1832 if minetest.is_protected(pos, player_name) then
1833 minetest.record_protection_violation(pos, player_name)
1836 local meta = minetest.get_meta(pos)
1837 if not fields.text then return end
1838 minetest.log("action", (player_name or "") .. " wrote \"" ..
1839 fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
1840 meta:set_string("text", fields.text)
1841 meta:set_string("infotext", '"' .. fields.text .. '"')
1846 register_sign("wood", "Wooden", {
1847 sounds = default.node_sound_wood_defaults(),
1848 groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
1851 register_sign("steel", "Steel", {
1852 sounds = default.node_sound_defaults(),
1853 groups = {cracky = 2, attached_node = 1}
1856 minetest.register_node("default:ladder_wood", {
1857 description = "Wooden Ladder",
1858 drawtype = "signlike",
1859 tiles = {"default_ladder_wood.png"},
1860 inventory_image = "default_ladder_wood.png",
1861 wield_image = "default_ladder_wood.png",
1862 paramtype = "light",
1863 paramtype2 = "wallmounted",
1864 sunlight_propagates = true,
1867 is_ground_content = false,
1869 type = "wallmounted",
1870 --wall_top = = <default>
1871 --wall_bottom = = <default>
1872 --wall_side = = <default>
1874 groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
1875 legacy_wallmounted = true,
1876 sounds = default.node_sound_wood_defaults(),
1879 minetest.register_node("default:ladder_steel", {
1880 description = "Steel Ladder",
1881 drawtype = "signlike",
1882 tiles = {"default_ladder_steel.png"},
1883 inventory_image = "default_ladder_steel.png",
1884 wield_image = "default_ladder_steel.png",
1885 paramtype = "light",
1886 paramtype2 = "wallmounted",
1887 sunlight_propagates = true,
1890 is_ground_content = false,
1892 type = "wallmounted",
1893 --wall_top = = <default>
1894 --wall_bottom = = <default>
1895 --wall_side = = <default>
1897 groups = {cracky = 2},
1898 sounds = default.node_sound_stone_defaults(),
1901 default.register_fence("default:fence_wood", {
1902 description = "Wooden Fence",
1903 texture = "default_fence_wood.png",
1904 inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1905 wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1906 material = "default:wood",
1907 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1908 sounds = default.node_sound_wood_defaults()
1911 default.register_fence("default:fence_acacia_wood", {
1912 description = "Acacia Fence",
1913 texture = "default_fence_acacia_wood.png",
1914 inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1915 wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1916 material = "default:acacia_wood",
1917 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1918 sounds = default.node_sound_wood_defaults()
1921 default.register_fence("default:fence_junglewood", {
1922 description = "Junglewood Fence",
1923 texture = "default_fence_junglewood.png",
1924 inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
1925 wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
1926 material = "default:junglewood",
1927 groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
1928 sounds = default.node_sound_wood_defaults()
1931 default.register_fence("default:fence_pine_wood", {
1932 description = "Pine Fence",
1933 texture = "default_fence_pine_wood.png",
1934 inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1935 wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1936 material = "default:pine_wood",
1937 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
1938 sounds = default.node_sound_wood_defaults()
1941 default.register_fence("default:fence_aspen_wood", {
1942 description = "Aspen Fence",
1943 texture = "default_fence_aspen_wood.png",
1944 inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1945 wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
1946 material = "default:aspen_wood",
1947 groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
1948 sounds = default.node_sound_wood_defaults()
1951 minetest.register_node("default:glass", {
1952 description = "Glass",
1953 drawtype = "glasslike_framed_optional",
1954 tiles = {"default_glass.png", "default_glass_detail.png"},
1955 paramtype = "light",
1956 sunlight_propagates = true,
1957 is_ground_content = false,
1958 groups = {cracky = 3, oddly_breakable_by_hand = 3},
1959 sounds = default.node_sound_glass_defaults(),
1962 minetest.register_node("default:obsidian_glass", {
1963 description = "Obsidian Glass",
1964 drawtype = "glasslike_framed_optional",
1965 tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
1966 paramtype = "light",
1967 is_ground_content = false,
1968 sunlight_propagates = true,
1969 sounds = default.node_sound_glass_defaults(),
1970 groups = {cracky = 3},
1974 minetest.register_node("default:rail", {
1975 description = "Rail",
1976 drawtype = "raillike",
1977 tiles = {"default_rail.png", "default_rail_curved.png",
1978 "default_rail_t_junction.png", "default_rail_crossing.png"},
1979 inventory_image = "default_rail.png",
1980 wield_image = "default_rail.png",
1981 paramtype = "light",
1982 sunlight_propagates = true,
1984 is_ground_content = false,
1987 -- but how to specify the dimensions for curved and sideways rails?
1988 fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
1990 groups = {dig_immediate = 2, attached_node = 1,
1991 connect_to_raillike = minetest.raillike_group("rail")},
1995 minetest.register_node("default:brick", {
1996 description = "Brick Block",
1997 paramtype2 = "facedir",
1999 tiles = {"default_brick.png"},
2000 is_ground_content = false,
2001 groups = {cracky = 3},
2002 sounds = default.node_sound_stone_defaults(),
2006 minetest.register_node("default:meselamp", {
2007 description = "Mese Lamp",
2008 drawtype = "glasslike",
2009 tiles = {"default_meselamp.png"},
2010 paramtype = "light",
2011 sunlight_propagates = true,
2012 is_ground_content = false,
2013 groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014 sounds = default.node_sound_glass_defaults(),
2015 light_source = default.LIGHT_MAX,
2022 minetest.register_node("default:cloud", {
2023 description = "Cloud",
2024 tiles = {"default_cloud.png"},
2025 is_ground_content = false,
2026 sounds = default.node_sound_defaults(),
2027 groups = {not_in_creative_inventory = 1},