nodes.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. minetest.register_node("nodetest:papyrus_roots", {
  2. description = "Papyrus Roots",
  3. tiles = {"nodetest_papyrus_roots.png"},
  4. paramtype = "light",
  5. is_ground_content = true,
  6. liquids_pointable = true,
  7. after_dig_node = function(pos, node, metadata, digger)
  8. node.name = "default:papyrus"
  9. default.dig_up(pos, node, digger)
  10. end,
  11. groups = {snappy=3, flammable=2, oddly_breakable_by_hand=1, soil=1},
  12. sounds = default.node_sound_leaves_defaults(),
  13. })
  14. minetest.register_alias("default:papyrus_roots", "nodetest:papyrus_roots")
  15. --
  16. -- Horizontal trees
  17. --
  18. minetest.register_node("nodetest:tree_horizontal", {
  19. description = "Tree",
  20. tiles = {
  21. "default_tree.png",
  22. "default_tree.png",
  23. "default_tree.png^[transformR90",
  24. "default_tree.png^[transformR90",
  25. "default_tree_top.png",
  26. "default_tree_top.png"
  27. },
  28. paramtype2 = "facedir",
  29. groups = {tree_horizontal=1, choppy=2, flammable=1},
  30. sounds = default.node_sound_wood_defaults(),
  31. on_construct = function(pos)
  32. default.rotate_horizontal(pos)
  33. end,
  34. })
  35. minetest.register_alias("default:tree_horizontal", "nodetest:tree_horizontal")
  36. minetest.register_node("nodetest:jungletree_horizontal", {
  37. description = "Jungle Tree",
  38. tiles = {
  39. "default_jungletree.png",
  40. "default_jungletree.png",
  41. "default_jungletree.png^[transformR90",
  42. "default_jungletree.png^[transformR90",
  43. "default_jungletree_top.png",
  44. "default_jungletree_top.png"
  45. },
  46. paramtype2 = "facedir",
  47. groups = {tree_horizontal=1, choppy=2, flammable=1},
  48. sounds = default.node_sound_wood_defaults(),
  49. on_construct = function(pos)
  50. default.rotate_horizontal(pos)
  51. end,
  52. })
  53. minetest.register_alias("default:jungletree_horizontal", "nodetest:jungletree_horizontal")
  54. minetest.register_node("nodetest:seedling", {
  55. description = "Seedling",
  56. drawtype = "torchlike",
  57. tiles = {"nodetest_seedling.png"},
  58. inventory_image = "nodetest_seedling.png",
  59. wield_image = "nodetest_seedling.png",
  60. paramtype = "light",
  61. sunlight_propagates = true,
  62. waving = 1,
  63. walkable = false,
  64. buildable_to = true,
  65. floodable = true,
  66. is_ground_content = true,
  67. groups = {snappy=3, dig_immediate=3, flammable=3, attached_node=1},
  68. sounds = default.node_sound_leaves_defaults(),
  69. selection_box = {
  70. type = "fixed",
  71. fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 },
  72. },
  73. })
  74. minetest.register_node("nodetest:bonfire", {
  75. description = "Bonfire",
  76. drawtype = "plantlike",
  77. visual_scale = 1.0,
  78. tiles = {
  79. {name="nodetest_bonfire_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0}}
  80. },
  81. inventory_image = "nodetest_bonfire.png",
  82. wield_image = "nodetest_bonfire.png",
  83. paramtype = "light",
  84. sunlight_propagates = true,
  85. walkable = false,
  86. drop = "",
  87. damage_per_second = 1,
  88. light_source = 12,
  89. groups = {snappy=3, attached_node=1},
  90. sounds = default.node_sound_defaults(),
  91. selection_box = {
  92. type = "fixed",
  93. fixed = {-0.375, -0.5, -0.375, 0.375, 0, 0.375},
  94. },
  95. })