init.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. local node_box = {
  2. {0, 0, 0, 16, 2, 16},
  3. }
  4. utility.transform_nodebox(node_box)
  5. minetest.register_node("lattice:lattice_wooden", {
  6. description = "Wooden Lattice",
  7. drawtype = "nodebox",
  8. paramtype = "light",
  9. is_ground_content = false,
  10. sunlight_propagates = true,
  11. inventory_image = "lattice_lattice.png",
  12. wield_image = "lattice_lattice.png",
  13. paramtype2 = "facedir",
  14. -- Use `basictrees:tree_wood` movement if in flat position.
  15. movement_speed_depends = "basictrees:tree_wood",
  16. groups = utility.dig_groups("pane_wood", {flammable = 2}),
  17. on_place = function(...) return stairs.rotate_and_place(...) end,
  18. tiles = {
  19. "lattice_lattice.png",
  20. },
  21. sounds = default.node_sound_wood_defaults(),
  22. node_box = {
  23. type = "fixed",
  24. fixed = node_box,
  25. },
  26. selection_box = {
  27. type = "fixed",
  28. fixed = node_box,
  29. },
  30. })
  31. -- Same recipe as for the default wood ladder, but turned on its side.
  32. minetest.register_craft({
  33. output = "lattice:lattice_wooden 2",
  34. recipe = {
  35. {'default:stick', 'default:stick', 'default:stick'},
  36. {'', 'default:stick', '' },
  37. {'default:stick', 'default:stick', 'default:stick'},
  38. }
  39. })
  40. minetest.register_node("lattice:glass_pane", {
  41. description = "Glass Sheet",
  42. drawtype = "nodebox",
  43. paramtype = "light",
  44. is_ground_content = false,
  45. sunlight_propagates = true,
  46. inventory_image = "default_glass.png",
  47. wield_image = "default_glass.png",
  48. paramtype2 = "facedir",
  49. -- Use `default:glass` movement if in flat position.
  50. movement_speed_depends = "default:glass",
  51. groups = utility.dig_groups("pane_glass"),
  52. on_place = function(...) return stairs.rotate_and_place(...) end,
  53. tiles = {
  54. "default_glass.png",
  55. },
  56. sounds = default.node_sound_glass_defaults(),
  57. node_box = {
  58. type = "fixed",
  59. fixed = node_box,
  60. },
  61. selection_box = {
  62. type = "fixed",
  63. fixed = node_box,
  64. },
  65. })
  66. minetest.register_craft({
  67. output = "lattice:glass_pane 10",
  68. recipe = {
  69. {'default:glass', 'default:glass'},
  70. {'default:glass', 'default:glass'},
  71. }
  72. })
  73. minetest.register_node("lattice:obsidian_glass_pane", {
  74. description = "Obsidian Glass Sheet",
  75. drawtype = "nodebox",
  76. paramtype = "light",
  77. is_ground_content = false,
  78. sunlight_propagates = true,
  79. inventory_image = "default_obsidian_glass.png",
  80. wield_image = "default_obsidian_glass.png",
  81. paramtype2 = "facedir",
  82. node_dig_prediction = "",
  83. -- Use `default:obsidian_glass` movement if in flat position.
  84. movement_speed_depends = "default:obsidian_glass",
  85. groups = utility.dig_groups("pane_glass"),
  86. on_place = function(...) return stairs.rotate_and_place(...) end,
  87. tiles = {
  88. "default_obsidian_glass.png",
  89. },
  90. sounds = default.node_sound_glass_defaults(),
  91. node_box = {
  92. type = "fixed",
  93. fixed = node_box,
  94. },
  95. selection_box = {
  96. type = "fixed",
  97. fixed = node_box,
  98. },
  99. })
  100. minetest.register_craft({
  101. output = "lattice:obsidian_glass_pane 10",
  102. recipe = {
  103. {'default:obsidian_glass', 'default:obsidian_glass'},
  104. {'default:obsidian_glass', 'default:obsidian_glass'},
  105. }
  106. })
  107. minetest.register_node("lattice:wrought_iron", {
  108. description = "Wrought Iron Lattice",
  109. drawtype = "nodebox",
  110. paramtype = "light",
  111. is_ground_content = false,
  112. sunlight_propagates = true,
  113. inventory_image = "doors_trapdoor_iron.png",
  114. wield_image = "doors_trapdoor_iron.png",
  115. paramtype2 = "facedir",
  116. node_dig_prediction = "",
  117. -- Use `default:steelblock` movement if in flat position.
  118. movement_speed_depends = "default:steelblock",
  119. groups = utility.dig_groups("pane_metal"),
  120. on_place = function(...) return stairs.rotate_and_place(...) end,
  121. tiles = {
  122. "doors_trapdoor_iron.png",
  123. },
  124. sounds = default.node_sound_metal_defaults(),
  125. node_box = {
  126. type = "fixed",
  127. fixed = node_box,
  128. },
  129. selection_box = {
  130. type = "fixed",
  131. fixed = node_box,
  132. },
  133. })
  134. minetest.register_craft({
  135. output = "lattice:wrought_iron 1",
  136. recipe = {
  137. {'default:iron_lump'},
  138. {'default:iron_lump'},
  139. {'default:iron_lump'},
  140. }
  141. })