nodes.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. --Poudlard mod by Perlipop
  2. --Code imported from moreblocks by Calinou
  3. -- Blocks
  4. minetest.register_node("poudlard:poudstone", {
  5. description = "Poudstone",
  6. tiles = {"poudlard_poudstone.png"},
  7. is_ground_content = true,
  8. groups = {cracky=3, stone=2},
  9. sounds = default.node_sound_stone_defaults(),
  10. })
  11. minetest.register_node("poudlard:poudwood", {
  12. description = "Poudlard Wooden Planks",
  13. tiles = {"poudlard_poudwood.png"},
  14. is_ground_content = true,
  15. groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
  16. sounds = default.node_sound_wood_defaults(),
  17. })
  18. minetest.register_node("poudlard:redblock", {
  19. description = "Red block",
  20. tiles = {"poudlard_redblock.png"},
  21. is_ground_content = true,
  22. groups = {cracky=3, stone=2},
  23. sounds = default.node_sound_stone_defaults(),
  24. })
  25. minetest.register_node("poudlard:blackblock", {
  26. description = "black block",
  27. tiles = {"poudlard_blackblock.png"},
  28. is_ground_content = true,
  29. groups = {cracky=3, stone=2},
  30. sounds = default.node_sound_stone_defaults(),
  31. })
  32. minetest.register_node("poudlard:junglewood", {
  33. description = "Jungle Wooden Planks",
  34. tiles = {"poudlard_junglewood.png"},
  35. paramtype2 = "facedir",
  36. is_ground_content = true,
  37. groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
  38. sounds = default.node_sound_wood_defaults(),
  39. })
  40. minetest.register_node("poudlard:stonebrick", {
  41. description = "Stone Bricks",
  42. tiles = {"poudlard_stonebrick.png"},
  43. is_ground_content = true,
  44. groups = {cracky=3},
  45. sounds = default.node_sound_stone_defaults(),
  46. })
  47. minetest.register_node("poudlard:circlestonebricks", {
  48. description = "Circle Stone Bricks",
  49. tiles = {"poudlard_circlestonebrick.png"},
  50. is_ground_content = true,
  51. groups = {cracky=3},
  52. sounds = default.node_sound_stone_defaults(),
  53. })
  54. minetest.register_node("poudlard:ironstonebricks", {
  55. description = "Iron Stone Bricks",
  56. tiles = {"poudlard_ironstonebrick.png"},
  57. is_ground_content = true,
  58. groups = {cracky=3},
  59. sounds = default.node_sound_stone_defaults(),
  60. })
  61. minetest.register_node("poudlard:stone_tile", {
  62. description = "Stonesquare",
  63. tiles = {"poudlard_stonesquare.png"},
  64. is_ground_content = true,
  65. groups = {cracky=3},
  66. sounds = default.node_sound_stone_defaults(),
  67. })
  68. minetest.register_node("poudlard:split_stone_tile", {
  69. description = "Split Stonesquare",
  70. tiles = {"poudlard_splitstonesquare_top.png", "poudlard_splitstonesquare.png"},
  71. is_ground_content = true,
  72. groups = {cracky=3},
  73. sounds = default.node_sound_stone_defaults(),
  74. })
  75. minetest.register_node("poudlard:plankstone", {
  76. description = "Plankstone",
  77. tiles = {
  78. "poudlard_plankstone.png",
  79. "poudlard_plankstone.png",
  80. "poudlard_plankstone.png",
  81. "poudlard_plankstone.png",
  82. "poudlard_plankstone_2.png",
  83. "poudlard_plankstone_2.png",
  84. },
  85. is_ground_content = true,
  86. groups = {cracky=3},
  87. sounds = default.node_sound_stone_defaults(),
  88. })
  89. minetest.register_node("poudlard:ironglass", {
  90. description = "Iron Glass",
  91. drawtype = "glasslike",
  92. tiles = {"poudlard_ironglass.png"},
  93. inventory_image = minetest.inventorycube("poudlard_ironglass.png"),
  94. paramtype = "light",
  95. sunlight_propagates = true,
  96. is_ground_content = true,
  97. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  98. sounds = default.node_sound_glass_defaults(),
  99. })
  100. minetest.register_node("poudlard:coalglass", {
  101. description = "Coal Glass",
  102. drawtype = "glasslike",
  103. tiles = {"poudlard_coalglass.png"},
  104. inventory_image = minetest.inventorycube("poudlard_coalglass.png"),
  105. paramtype = "light",
  106. sunlight_propagates = true,
  107. is_ground_content = true,
  108. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  109. sounds = default.node_sound_glass_defaults(),
  110. })
  111. minetest.register_node("poudlard:cleanglass", {
  112. description = "Clean Glass",
  113. drawtype = "glasslike",
  114. tiles = {"poudlard_cleanglass.png"},
  115. inventory_image = minetest.inventorycube("poudlard_cleanglass.png"),
  116. paramtype = "light",
  117. sunlight_propagates = true,
  118. is_ground_content = true,
  119. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  120. sounds = default.node_sound_glass_defaults(),
  121. })
  122. minetest.register_node("poudlard:cactuschecker", {
  123. description = "Cactus Checker",
  124. tiles = {
  125. "poudlard_cactuschecker.png",
  126. "poudlard_cactuschecker.png",
  127. "poudlard_cactuschecker.png",
  128. "poudlard_cactuschecker.png",
  129. "poudlard_cactuschecker_2.png",
  130. "poudlard_cactuschecker_2.png",
  131. },
  132. is_ground_content = true,
  133. groups = {cracky=3},
  134. sounds = default.node_sound_stone_defaults(),
  135. })
  136. minetest.register_node("poudlard:emptybookshelf", {
  137. description = "Empty Bookshelf",
  138. tiles = {"default_wood.png", "default_wood.png", "poudlard_emptybookshelf.png"},
  139. is_ground_content = true,
  140. groups = {snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
  141. sounds = default.node_sound_wood_defaults(),
  142. })
  143. minetest.register_node("poudlard:coalstone", {
  144. description = "Coal Stone",
  145. tiles = {"poudlard_coalstone.png"},
  146. is_ground_content = true,
  147. groups = {cracky=3},
  148. sounds = default.node_sound_stone_defaults(),
  149. })
  150. minetest.register_node("poudlard:ironstone", {
  151. description = "Iron Stone",
  152. tiles = {"poudlard_ironstone.png"},
  153. is_ground_content = true,
  154. groups = {cracky=3},
  155. sounds = default.node_sound_stone_defaults(),
  156. })
  157. minetest.register_node("poudlard:coalchecker", {
  158. description = "Coal Checker",
  159. tiles = {
  160. "poudlard_coalchecker.png",
  161. "poudlard_coalchecker.png",
  162. "poudlard_coalchecker.png",
  163. "poudlard_coalchecker.png",
  164. "poudlard_coalchecker_2.png",
  165. "poudlard_coalchecker_2.png",
  166. },
  167. is_ground_content = true,
  168. groups = {cracky=3},
  169. sounds = default.node_sound_stone_defaults(),
  170. })
  171. minetest.register_node("poudlard:ironchecker", {
  172. description = "Iron Checker",
  173. tiles = {
  174. "poudlard_ironchecker.png",
  175. "poudlard_ironchecker.png",
  176. "poudlard_ironchecker.png",
  177. "poudlard_ironchecker.png",
  178. "poudlard_ironchecker_2.png",
  179. "poudlard_ironchecker_2.png",
  180. },
  181. is_ground_content = true,
  182. groups = {cracky=3},
  183. sounds = default.node_sound_stone_defaults(),
  184. })
  185. minetest.register_node("poudlard:trapstone", {
  186. description = "Trapstone",
  187. tiles = {"poudlard_trapstone.png"},
  188. walkable = false,
  189. is_ground_content = true,
  190. groups = {cracky=3},
  191. sounds = default.node_sound_stone_defaults(),
  192. })
  193. minetest.register_node("poudlard:trapglass", {
  194. description = "Trapglass",
  195. drawtype = "glasslike",
  196. tiles = {"poudlard_trapglass.png"},
  197. inventory_image = minetest.inventorycube("poudlard_trapglass.png"),
  198. paramtype = "light",
  199. sunlight_propagates = true,
  200. walkable = false,
  201. is_ground_content = true,
  202. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  203. sounds = default.node_sound_glass_defaults(),
  204. })
  205. minetest.register_node("poudlard:fence_junglewood", {
  206. description = "Jungle Wood Fence",
  207. drawtype = "fencelike",
  208. tiles = {"poudlard_junglewood.png"},
  209. inventory_image = "poudlard_junglewood_fence.png",
  210. wield_image = "poudlard_junglewood_fence.png",
  211. paramtype = "light",
  212. is_ground_content = true,
  213. selection_box = {
  214. type = "fixed",
  215. fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
  216. },
  217. groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=2},
  218. sounds = default.node_sound_wood_defaults(),
  219. })
  220. minetest.register_node("poudlard:horizontaltree", {
  221. description = "Horizontal Tree",
  222. tiles = {"default_tree.png", "default_tree.png", "poudlard_horizontaltree.png",
  223. "poudlard_horizontaltree.png", "default_tree_top.png", "default_tree_top.png"},
  224. paramtype2 = "facedir",
  225. groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
  226. sounds = default.node_sound_wood_defaults(),
  227. furnace_burntime = 30,
  228. })
  229. minetest.register_node("poudlard:allfacestree", {
  230. description = "All-faces Tree",
  231. tiles = {"default_tree_top.png"},
  232. groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
  233. sounds = default.node_sound_wood_defaults(),
  234. furnace_burntime = 30,
  235. })
  236. minetest.register_node("poudlard:alltree", {
  237. description = "All-faces Tree",
  238. tiles = {"default_tree.png"},
  239. groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
  240. sounds = default.node_sound_wood_defaults(),
  241. furnace_burntime = 30,
  242. })
  243. minetest.register_node("poudlard:superglowglass", {
  244. description = "Super Glowglass",
  245. drawtype = "glasslike",
  246. tiles = {"poudlard_glowglass.png"},
  247. inventory_image = minetest.inventorycube("poudlard_glowglass.png"),
  248. paramtype = "light",
  249. sunlight_propagates = true,
  250. light_source = 15,
  251. is_ground_content = true,
  252. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  253. sounds = default.node_sound_glass_defaults(),
  254. })
  255. minetest.register_node("poudlard:rope", {
  256. description = "Rope",
  257. drawtype = "signlike",
  258. tiles = {"poudlard_rope.png"},
  259. inventory_image = "poudlard_rope.png",
  260. wield_image = "poudlard_rope.png",
  261. paramtype = "light",
  262. paramtype2 = "wallmounted",
  263. is_ground_content = true,
  264. walkable = false,
  265. climbable = true,
  266. selection_box = {
  267. type = "wallmounted",
  268. },
  269. groups = {snappy=3,flammable=2},
  270. sounds = default.node_sound_leaves_defaults(),
  271. })
  272. minetest.register_node("poudlard:wood_tile", {
  273. description = "Wooden Tile",
  274. tiles = {"poudlard_wood_tile.png", "poudlard_wood_tile.png", "poudlard_wood_tile.png", "poudlard_wood_tile.png", "poudlard_wood_tile.png^[transformR90", "poudlard_wood_tile.png^[transformR90"},
  275. inventory_image = {"poudlard_wood_tile.png", "poudlard_wood_tile.png"},
  276. paramtype2 = "facedir",
  277. groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
  278. sounds = default.node_sound_wood_defaults(),
  279. })
  280. minetest.register_node("poudlard:wood_tile_full", {
  281. description = "Full Wooden Tile",
  282. tiles = {"poudlard_wood_tile_full.png", "poudlard_wood_tile_full.png", "poudlard_wood_tile_full.png",
  283. "poudlard_wood_tile_full.png", "poudlard_wood_tile_full.png^[transformR90", "poudlard_wood_tile_full.png^[transformR90"},
  284. inventory_image = {"poudlard_wood_tile_full.png", "poudlard_wood_tile_full.png"},
  285. paramtype2 = "facedir",
  286. groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
  287. sounds = default.node_sound_wood_defaults(),
  288. })
  289. minetest.register_node("poudlard:wood_tile_center", {
  290. description = "Centered Wooden Tile",
  291. tiles = {"poudlard_wood_tile_center.png", "poudlard_wood_tile_center.png", "poudlard_wood_tile_center.png", "poudlard_wood_tile_center.png", "poudlard_wood_tile_center.png^[transformR90", "poudlard_wood_tile_center.png^[transformR90"},
  292. inventory_image = {"poudlard_wood_tile_center.png", "poudlard_wood_tile_center.png"},
  293. paramtype2 = "facedir",
  294. groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
  295. sounds = default.node_sound_wood_defaults(),
  296. })
  297. minetest.register_node("poudlard:secretbookshelf", {
  298. description = "Secret_bookshelf",
  299. tiles = {"default_wood.png", "default_wood.png","poudlard_secretbookshelf.png"},
  300. walkable = false,
  301. is_ground_content = true,
  302. groups = {cracky=3},
  303. sounds = default.node_sound_stone_defaults(),
  304. })
  305. -- Items
  306. minetest.register_craftitem("poudlard:sweeper", {
  307. description = "Sweeper",
  308. inventory_image = "poudlard_sweeper.png",
  309. })
  310. minetest.register_craftitem("poudlard:junglestick", {
  311. description = "Jungle Stick",
  312. inventory_image = "poudlard_junglestick.png",
  313. })