default_nodes.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. --[[
  2. Map Tools: unbreakable default nodes
  3. Copyright (c) 2012-2015 Calinou and contributors.
  4. Licensed under the zlib license. See LICENSE.md for more information.
  5. --]]
  6. local S = maptools.intllib
  7. maptools.creative = maptools.config["hide_from_creative_inventory"]
  8. minetest.register_node("maptools:stone", {
  9. description = S("Unbreakable Stone"),
  10. range = 12,
  11. stack_max = 10000,
  12. tiles = {"default_stone.png"},
  13. drop = "",
  14. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  15. sounds = default.node_sound_stone_defaults(),
  16. })
  17. minetest.register_node("maptools:stonebrick", {
  18. description = S("Unbreakable Stone Brick"),
  19. range = 12,
  20. stack_max = 10000,
  21. tiles = {"default_stone_brick.png"},
  22. drop = "",
  23. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  24. sounds = default.node_sound_stone_defaults(),
  25. })
  26. stairs.register_stair_and_slab(
  27. "unbreakable_stonebrick",
  28. "maptools:stonebrick",
  29. {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  30. {"default_stone_brick.png"},
  31. "Unbreakable Stone Brick",
  32. default.node_sound_stone_defaults()
  33. )
  34. minetest.register_node("maptools:tree", {
  35. drawtype = "nodebox",
  36. paramtype = "light",
  37. node_box = {
  38. type = "fixed",
  39. fixed = basictrees.trunk_nodebox,
  40. },
  41. description = S("Unbreakable Tree"),
  42. range = 12,
  43. stack_max = 10000,
  44. paramtype2 = "facedir",
  45. tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
  46. drop = "",
  47. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  48. sounds = default.node_sound_wood_defaults(),
  49. on_place = minetest.rotate_node,
  50. movement_speed_multiplier = default.NORM_SPEED,
  51. })
  52. minetest.register_node("maptools:jungletree", {
  53. drawtype = "nodebox",
  54. paramtype = "light",
  55. node_box = {
  56. type = "fixed",
  57. fixed = basictrees.trunk_nodebox,
  58. },
  59. description = S("Unbreakable Jungle Tree"),
  60. range = 12,
  61. stack_max = 10000,
  62. tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
  63. drop = "",
  64. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  65. sounds = default.node_sound_wood_defaults(),
  66. on_place = minetest.rotate_node,
  67. movement_speed_multiplier = default.NORM_SPEED,
  68. })
  69. do
  70. local nodebox = {
  71. -- Spine strips.
  72. {0, 1, 1, 16, 15, 1},
  73. {0, 1, 15, 16, 15, 15},
  74. {1, 1, 0, 1, 15, 16},
  75. {15, 1, 0, 15, 15, 16},
  76. -- Meat.
  77. {1, 0, 1, 15, 16, 15},
  78. -- Side skin.
  79. {4, 0, 0, 12, 16, 16},
  80. {0, 0, 4, 16, 16, 12},
  81. }
  82. local selectionbox = {
  83. {1, 0, 1, 15, 16, 15},
  84. }
  85. utility.transform_nodebox(nodebox)
  86. utility.transform_nodebox(selectionbox)
  87. minetest.register_node("maptools:cactus", {
  88. paramtype = "light",
  89. drawtype = "nodebox",
  90. node_box = {
  91. type = "fixed",
  92. fixed = nodebox,
  93. },
  94. selection_box = {
  95. type = "fixed",
  96. fixed = selectionbox,
  97. },
  98. description = S("Unbreakable Cactus"),
  99. range = 12,
  100. stack_max = 10000,
  101. tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
  102. drop = "",
  103. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  104. sounds = default.node_sound_wood_defaults(),
  105. on_place = minetest.rotate_node
  106. })
  107. end
  108. minetest.register_node("maptools:papyrus", {
  109. description = S("Unbreakable Papyrus"),
  110. drawtype = "plantlike",
  111. range = 12,
  112. stack_max = 10000,
  113. tiles = {"default_papyrus.png"},
  114. inventory_image = "default_papyrus.png",
  115. wield_image = "default_papyrus.png",
  116. walkable = false,
  117. paramtype = "light",
  118. sunlight_propagates = true,
  119. drop = "",
  120. selection_box = {
  121. type = "fixed",
  122. fixed = {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}
  123. },
  124. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  125. sounds = default.node_sound_leaves_defaults(),
  126. movement_speed_multiplier = default.SLOW_SPEED_PLANTS,
  127. })
  128. minetest.register_node("maptools:dirt", {
  129. description = S("Unbreakable Dirt"),
  130. range = 12,
  131. stack_max = 10000,
  132. tiles = {"default_dirt.png"},
  133. drop = "",
  134. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  135. sounds = default.node_sound_dirt_defaults(),
  136. })
  137. minetest.register_node("maptools:wood", {
  138. description = S("Unbreakable Wooden Planks"),
  139. range = 12,
  140. stack_max = 10000,
  141. tiles = {"default_wood.png"},
  142. drop = "",
  143. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  144. sounds = default.node_sound_wood_defaults(),
  145. })
  146. minetest.register_node("maptools:junglewood", {
  147. description = S("Unbreakable Jungle Wood Planks"),
  148. range = 12,
  149. stack_max = 10000,
  150. tiles = {"default_junglewood.png"},
  151. drop = "",
  152. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  153. sounds = default.node_sound_wood_defaults(),
  154. })
  155. minetest.register_node("maptools:glass", {
  156. description = S("Unbreakable Glass"),
  157. range = 12,
  158. stack_max = 10000,
  159. drawtype = "glasslike",
  160. tiles = {"default_glass.png"},
  161. paramtype = "light",
  162. sunlight_propagates = true,
  163. drop = "",
  164. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  165. sounds = default.node_sound_glass_defaults(),
  166. })
  167. minetest.register_node("maptools:leaves", {
  168. description = S("Unbreakable Leaves"),
  169. range = 12,
  170. stack_max = 10000,
  171. drawtype = "allfaces_optional",
  172. tiles = {"default_leaves.png"},
  173. paramtype = "light",
  174. drop = "",
  175. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  176. sounds = default.node_sound_leaves_defaults(),
  177. })
  178. minetest.register_node("maptools:sand", {
  179. description = S("Unbreakable Sand"),
  180. range = 12,
  181. stack_max = 10000,
  182. tiles = {"default_sand.png"},
  183. drop = "",
  184. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  185. sounds = default.node_sound_sand_defaults(),
  186. })
  187. minetest.register_node("maptools:gravel", {
  188. description = S("Unbreakable Gravel"),
  189. range = 12,
  190. stack_max = 10000,
  191. tiles = {"default_gravel.png"},
  192. drop = "",
  193. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  194. sounds = default.node_sound_dirt_defaults({
  195. footstep = {name="default_gravel_footstep", gain=0.35},
  196. dug = {name="default_gravel_footstep", gain=0.6},
  197. }),
  198. })
  199. minetest.register_node("maptools:clay", {
  200. description = S("Unbreakable Clay"),
  201. range = 12,
  202. stack_max = 10000,
  203. tiles = {"default_clay.png"},
  204. drop = "",
  205. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  206. sounds = default.node_sound_dirt_defaults(),
  207. })
  208. minetest.register_node("maptools:desert_sand", {
  209. description = S("Unbreakable Desert Sand"),
  210. range = 12,
  211. stack_max = 10000,
  212. tiles = {"default_desert_sand.png"},
  213. drop = "",
  214. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  215. sounds = default.node_sound_sand_defaults(),
  216. })
  217. minetest.register_node("maptools:sandstone", {
  218. description = S("Unbreakable Sandstone"),
  219. range = 12,
  220. stack_max = 10000,
  221. tiles = {"default_sandstone.png"},
  222. drop = "",
  223. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  224. sounds = default.node_sound_stone_defaults(),
  225. })
  226. minetest.register_node("maptools:sandstone_brick", {
  227. description = S("Unbreakable Sandstone Brick"),
  228. range = 12,
  229. stack_max = 10000,
  230. tiles = {"default_sandstone_brick.png"},
  231. drop = "",
  232. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  233. sounds = default.node_sound_stone_defaults(),
  234. })
  235. minetest.register_node("maptools:desert_stone", {
  236. description = S("Unbreakable Desert Stone"),
  237. range = 12,
  238. stack_max = 10000,
  239. tiles = {"default_desert_stone.png"},
  240. drop = "",
  241. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  242. sounds = default.node_sound_stone_defaults(),
  243. })
  244. minetest.register_node("maptools:desert_cobble", {
  245. description = S("Unbreakable Desert Cobble"),
  246. range = 12,
  247. stack_max = 10000,
  248. tiles = {"default_desert_cobble.png"},
  249. drop = "",
  250. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  251. sounds = default.node_sound_stone_defaults(),
  252. })
  253. minetest.register_node("maptools:desert_stonebrick", {
  254. description = S("Unbreakable Desert Stone Brick"),
  255. range = 12,
  256. stack_max = 10000,
  257. tiles = {"default_desert_stone_brick.png"},
  258. drop = "",
  259. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  260. sounds = default.node_sound_stone_defaults(),
  261. })
  262. minetest.register_node("maptools:grass", {
  263. description = S("Unbreakable Dirt with Grass"),
  264. range = 12,
  265. stack_max = 10000,
  266. tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
  267. paramtype2 = "facedir",
  268. drop = "",
  269. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  270. sounds = default.node_sound_dirt_defaults({
  271. footstep = {name="default_grass_footstep", gain = 0.4},
  272. }),
  273. })
  274. minetest.register_node("maptools:fullgrass", {
  275. description = S("Unbreakable Full Grass"),
  276. range = 12,
  277. stack_max = 10000,
  278. tiles = {"default_grass.png"},
  279. drop = "",
  280. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  281. sounds = default.node_sound_dirt_defaults({
  282. footstep = {name="default_grass_footstep", gain=0.4},
  283. }),
  284. })
  285. for slab_num = 1,3,1 do
  286. minetest.register_node("maptools:slab_grass_" .. slab_num * 4, {
  287. description = S("Grass Slab"),
  288. range = 12,
  289. stack_max = 10000,
  290. tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^maptools_grass_side_" .. slab_num * 4 .. ".png"},
  291. drawtype = "nodebox",
  292. node_box = {
  293. type = "fixed",
  294. fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + slab_num * 0.25, 0.5},
  295. },
  296. sunlight_propagates = true,
  297. paramtype = "light",
  298. paramtype2 = "facedir",
  299. drop = "",
  300. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  301. sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}),
  302. })
  303. end
  304. minetest.register_node("maptools:cobble", {
  305. description = S("Unbreakable Cobblestone"),
  306. range = 12,
  307. stack_max = 10000,
  308. tiles = {"default_cobble.png"},
  309. drop = "",
  310. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  311. sounds = default.node_sound_stone_defaults(),
  312. })
  313. minetest.register_node("maptools:mossycobble", {
  314. description = S("Unbreakable Mossy Cobblestone"),
  315. range = 12,
  316. stack_max = 10000,
  317. tiles = {"default_mossycobble.png"},
  318. drop = "",
  319. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  320. sounds = default.node_sound_stone_defaults(),
  321. })
  322. minetest.register_node("maptools:brick", {
  323. description = S("Unbreakable Brick"),
  324. range = 12,
  325. stack_max = 10000,
  326. tiles = {"default_brick.png"},
  327. drop = "",
  328. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  329. sounds = default.node_sound_stone_defaults(),
  330. })
  331. minetest.register_node("maptools:coalblock", {
  332. description = S("Unbreakable Coal Block"),
  333. range = 12,
  334. stack_max = 10000,
  335. tiles = {"default_coal_block.png"},
  336. drop = "",
  337. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  338. sounds = default.node_sound_stone_defaults(),
  339. })
  340. minetest.register_node("maptools:steelblock", {
  341. description = S("Unbreakable Wrought Iron Block"),
  342. range = 12,
  343. stack_max = 10000,
  344. tiles = {"default_steel_block.png"},
  345. drop = "",
  346. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  347. sounds = default.node_sound_stone_defaults(),
  348. })
  349. minetest.register_node("maptools:goldblock", {
  350. description = S("Unbreakable Gold Block"),
  351. range = 12,
  352. stack_max = 10000,
  353. tiles = {"default_gold_block.png"},
  354. drop = "",
  355. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  356. sounds = default.node_sound_stone_defaults(),
  357. })
  358. minetest.register_node("maptools:copperblock", {
  359. description = S("Unbreakable Copper Block"),
  360. range = 12,
  361. stack_max = 10000,
  362. tiles = {"default_copper_block.png"},
  363. drop = "",
  364. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  365. sounds = default.node_sound_stone_defaults(),
  366. })
  367. minetest.register_node("maptools:bronzeblock", {
  368. description = S("Unbreakable Bronze Block"),
  369. range = 12,
  370. stack_max = 10000,
  371. tiles = {"default_bronze_block.png"},
  372. drop = "",
  373. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  374. sounds = default.node_sound_stone_defaults(),
  375. })
  376. minetest.register_node("maptools:diamondblock", {
  377. description = S("Unbreakable Diamond Block"),
  378. range = 12,
  379. stack_max = 10000,
  380. tiles = {"default_diamond_block.png"},
  381. drop = "",
  382. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative},
  383. sounds = default.node_sound_stone_defaults(),
  384. })
  385. -- Farming:
  386. minetest.register_node("maptools:soil_wet", {
  387. description = "Wet Soil",
  388. range = 12,
  389. stack_max = 10000,
  390. tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
  391. drop = "",
  392. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, grassland = 1},
  393. sounds = default.node_sound_dirt_defaults(),
  394. })
  395. minetest.register_node("maptools:desert_sand_soil_wet", {
  396. description = "Wet Desert Sand Soil",
  397. range = 12,
  398. stack_max = 10000,
  399. drop = "",
  400. tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"},
  401. groups = {unbreakable = 1, not_in_craft_guide = 1, not_in_creative_inventory = maptools.creative, soil = 3, wet = 1, desert = 1},
  402. sounds = default.node_sound_sand_defaults(),
  403. })