init.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. -- Use `default:obsidian_glass` movement if in flat position.
  83. movement_speed_depends = "default:obsidian_glass",
  84. groups = utility.dig_groups("pane_glass"),
  85. on_place = function(...) return stairs.rotate_and_place(...) end,
  86. tiles = {
  87. "default_obsidian_glass.png",
  88. },
  89. sounds = default.node_sound_glass_defaults(),
  90. node_box = {
  91. type = "fixed",
  92. fixed = node_box,
  93. },
  94. selection_box = {
  95. type = "fixed",
  96. fixed = node_box,
  97. },
  98. })
  99. minetest.register_craft({
  100. output = "lattice:obsidian_glass_pane 10",
  101. recipe = {
  102. {'default:obsidian_glass', 'default:obsidian_glass'},
  103. {'default:obsidian_glass', 'default:obsidian_glass'},
  104. }
  105. })
  106. minetest.register_node("lattice:wrought_iron", {
  107. description = "Wrought Iron Lattice",
  108. drawtype = "nodebox",
  109. paramtype = "light",
  110. is_ground_content = false,
  111. sunlight_propagates = true,
  112. inventory_image = "doors_trapdoor_iron.png",
  113. wield_image = "doors_trapdoor_iron.png",
  114. paramtype2 = "facedir",
  115. -- Use `default:steelblock` movement if in flat position.
  116. movement_speed_depends = "default:steelblock",
  117. groups = utility.dig_groups("pane_metal"),
  118. on_place = function(...) return stairs.rotate_and_place(...) end,
  119. tiles = {
  120. "doors_trapdoor_iron.png",
  121. },
  122. sounds = default.node_sound_metal_defaults(),
  123. node_box = {
  124. type = "fixed",
  125. fixed = node_box,
  126. },
  127. selection_box = {
  128. type = "fixed",
  129. fixed = node_box,
  130. },
  131. })
  132. minetest.register_craft({
  133. output = "lattice:wrought_iron 1",
  134. recipe = {
  135. {'default:iron_lump'},
  136. {'default:iron_lump'},
  137. {'default:iron_lump'},
  138. }
  139. })