init.lua 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. rackstone = rackstone or {}
  2. rackstone.modpath = minetest.get_modpath("rackstone")
  3. -- group:rackstone is being used to check if a node should be considered naturally occuring for ambiance purposes.
  4. -- Localize for performance.
  5. local math_random = math.random
  6. rackstone.rackstone_sounds =
  7. function()
  8. local table = {
  9. dig = {name="rackstone_dugstonemetal", gain=1.0},
  10. dug = {name="rackstone_digstonemetal", gain=1.0},
  11. --place = {name="rackstone_placestonemetal", gain=1.0},
  12. }
  13. return default.node_sound_stone_defaults(table)
  14. end
  15. rackstone.cobble_sounds =
  16. function()
  17. local table = {
  18. footstep = {name="default_gravel_footstep", gain=0.5},
  19. }
  20. return default.node_sound_stone_defaults(table)
  21. end
  22. rackstone.destabilize_dauthsand =
  23. function(pos)
  24. local minp = {x=pos.x-1, y=pos.y, z=pos.z-1}
  25. local maxp = {x=pos.x+1, y=pos.y, z=pos.z+1}
  26. local nodes = minetest.find_nodes_in_area(minp, maxp, "rackstone:dauthsand_stable")
  27. for k, v in ipairs(nodes) do
  28. minetest.add_node(v, {name="rackstone:dauthsand"})
  29. minetest.check_for_falling(v)
  30. end
  31. end
  32. minetest.register_node("rackstone:rackstone", {
  33. description = "Rackstone",
  34. tiles = {"rackstone_rackstone.png"},
  35. groups = utility.dig_groups("stone", {rackstone=1, stabilize_dauthsand=1, netherack=1}),
  36. sounds = default.node_sound_stone_defaults(),
  37. after_destruct = rackstone.destabilize_dauthsand,
  38. movement_speed_multiplier = default.ROAD_SPEED_NETHER,
  39. -- Common stone does not count toward tool's dig count.
  40. _toolranks = {
  41. ignore = true,
  42. },
  43. drop = "rackstone:cobble",
  44. })
  45. minetest.register_node("rackstone:cobble", {
  46. description = "Rackstone Cobble",
  47. tiles = {"rackstone_rackstone_cobble.png"},
  48. groups = utility.dig_groups("cobble", {rackstone=1, stabilize_dauthsand=1, netherack=1}),
  49. sounds = rackstone.cobble_sounds(),
  50. after_destruct = rackstone.destabilize_dauthsand,
  51. movement_speed_multiplier = default.ROAD_SPEED_NETHER,
  52. -- Common stone does not count toward tool's dig count.
  53. _toolranks = {
  54. ignore = true,
  55. },
  56. _no_auto_pop = true,
  57. })
  58. minetest.register_node("rackstone:rackstone_brick2", {
  59. description = "Rackstone Brick",
  60. paramtype2 = "facedir",
  61. place_param2 = 0,
  62. tiles = {"rackstone_rackstone_brick.png"},
  63. groups = utility.dig_groups("brick", {rackstone=1, brick=1}),
  64. sounds = default.node_sound_stone_defaults(),
  65. })
  66. minetest.register_node("rackstone:rackstone_block", {
  67. description = "Rackstone Block",
  68. paramtype2 = "facedir",
  69. place_param2 = 0,
  70. tiles = {"rackstone_rackstone_block.png"},
  71. groups = utility.dig_groups("block", {rackstone=1}),
  72. sounds = default.node_sound_stone_defaults(),
  73. })
  74. local after_redrack_remove = function(pos)
  75. -- Remove netherflame above.
  76. local flamepos = {x=pos.x, y=pos.y+1, z=pos.z}
  77. if minetest.get_node(flamepos).name == "fire:nether_flame" then
  78. minetest.remove_node(flamepos)
  79. end
  80. -- Tricks!
  81. if math_random(1, 500) == 1 then
  82. local which = math_random(1, 4)
  83. ambiance.sound_play("tnt_gunpowder_burning", pos, 2, 20)
  84. if which == 1 then
  85. minetest.add_node(pos, {name='rackstone:evilrack'})
  86. core.check_for_falling(pos)
  87. elseif which == 2 then
  88. minetest.add_node(pos, {name="fire:nether_flame"})
  89. elseif which == 3 then
  90. minetest.add_node(pos, {name="default:lava_source"})
  91. else
  92. --ambiance.sound_play("tnt_gunpowder_burning", pos, 2, 20)
  93. -- Delay after TNT gunpowder burning sound to give warning.
  94. minetest.after(1.5, function()
  95. local def = {
  96. radius = 3,
  97. damage_radius = 2,
  98. ignore_protection = false,
  99. disable_drops = true,
  100. ignore_on_blast = false,
  101. }
  102. tnt.boom(pos, def)
  103. end)
  104. end
  105. end
  106. end
  107. rackstone.after_redrack_remove = after_redrack_remove
  108. local on_redrack_place = function(pos)
  109. if math_random(1, 6) == 1 then
  110. local posabove = {x=pos.x, y=pos.y+1, z=pos.z}
  111. local light = minetest.get_node_light(posabove)
  112. if light then
  113. if light >= 15 then
  114. -- Copy position table, just in case.
  115. local npos = {x=pos.x, y=pos.y, z=pos.z}
  116. ambiance.sound_play("default_gravel_footstep", npos, 1, 20)
  117. minetest.after(math_random(1, 6), function()
  118. minetest.remove_node(npos)
  119. local def = {
  120. radius = 2,
  121. damage_radius = 2,
  122. ignore_protection = false,
  123. disable_drops = true,
  124. ignore_on_blast = false,
  125. }
  126. tnt.boom(npos, def)
  127. end)
  128. end
  129. end
  130. end
  131. end
  132. rackstone.on_redrack_place = on_redrack_place
  133. minetest.register_node("rackstone:redrack", {
  134. description = "Netherack",
  135. tiles = {"rackstone_redrack.png"},
  136. groups = utility.dig_groups("netherack", {rackstone=1, stabilize_dauthsand=1, netherack=1}),
  137. sounds = rackstone.rackstone_sounds(),
  138. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  139. drop = "rackstone:redrack_cobble",
  140. -- Common stone does not count toward tool's dig count.
  141. _toolranks = {
  142. ignore = true,
  143. },
  144. after_destruct = function(...)
  145. after_redrack_remove(...)
  146. rackstone.destabilize_dauthsand(...)
  147. end,
  148. on_construct = function(...)
  149. on_redrack_place(...)
  150. end,
  151. on_player_walk_over = function(pos, player)
  152. if math_random(1, 2000) == 1 then
  153. minetest.after(math_random(1, 4), function()
  154. if not minetest.test_protection(pos, "") then
  155. tnt.boom(pos, {
  156. radius = 2,
  157. ignore_protection = false,
  158. ignore_on_blast = false,
  159. damage_radius = 3,
  160. disable_drops = true,
  161. })
  162. end
  163. end)
  164. end
  165. end,
  166. })
  167. minetest.register_node("rackstone:redrack_cobble", {
  168. description = "Cobbled Netherack",
  169. tiles = {"rackstone_redrack_cobble.png"},
  170. groups = utility.dig_groups("netherack", {rackstone=1, stabilize_dauthsand=1, netherack=1}),
  171. sounds = rackstone.rackstone_sounds(),
  172. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  173. -- Common stone does not count toward tool's dig count.
  174. _toolranks = {
  175. ignore = true,
  176. },
  177. _no_auto_pop = true,
  178. after_destruct = function(...)
  179. rackstone.destabilize_dauthsand(...)
  180. end,
  181. on_construct = function(...)
  182. on_redrack_place(...)
  183. end,
  184. on_player_walk_over = function(pos, player)
  185. if math_random(1, 10000) == 1 then
  186. minetest.after(math_random(1, 4), function()
  187. if not minetest.test_protection(pos, "") then
  188. tnt.boom(pos, {
  189. radius = 2,
  190. ignore_protection = false,
  191. ignore_on_blast = false,
  192. damage_radius = 2,
  193. disable_drops = true,
  194. })
  195. end
  196. end)
  197. end
  198. end,
  199. })
  200. minetest.register_node("rackstone:nether_grit", {
  201. description = "Nether Grit",
  202. tiles = {"rackstone_redrack2.png"},
  203. groups = utility.dig_groups("racksand", {falling_node=1}),
  204. sounds = rackstone.rackstone_sounds(),
  205. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  206. liquid_viscosity = 8,
  207. liquidtype = "source",
  208. liquid_alternative_flowing = "rackstone:nether_grit",
  209. liquid_alternative_source = "rackstone:nether_grit",
  210. liquid_renewable = false,
  211. liquid_range = 0,
  212. walkable = false,
  213. drawtype = "glasslike",
  214. paramtype = "light",
  215. post_effect_color = {a = 200, r = 30, g = 0, b = 0},
  216. damage_per_second = 1,
  217. drop = {
  218. max_items = 1,
  219. items = {
  220. {items = {'default:flint'}, rarity = 16},
  221. {items = {'rackstone:nether_grit'}}
  222. }
  223. },
  224. })
  225. minetest.register_node("rackstone:void", {
  226. description = "Nether Void Gap (You Hacker!)",
  227. tiles = {"rackstone_redrack.png"},
  228. groups = utility.dig_groups("cobble"),
  229. sounds = rackstone.rackstone_sounds(),
  230. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  231. walkable = false,
  232. drawtype = "glasslike",
  233. paramtype = "light",
  234. post_effect_color = {a = 200, r = 30, g = 0, b = 0},
  235. damage_per_second = 1,
  236. drop = "",
  237. })
  238. minetest.register_node("rackstone:redrack_with_iron", {
  239. description = "Netherack With Iron",
  240. tiles = {"rackstone_redrack.png^default_mineral_iron.png"},
  241. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore = 1}),
  242. sounds = rackstone.rackstone_sounds(),
  243. drop = "default:iron_lump",
  244. silverpick_drop = true,
  245. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  246. after_destruct = function(...)
  247. after_redrack_remove(...)
  248. end,
  249. })
  250. minetest.register_node("rackstone:redrack_with_copper", {
  251. description = "Netherack With Copper",
  252. tiles = {"rackstone_redrack.png^default_mineral_copper.png"},
  253. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  254. sounds = rackstone.rackstone_sounds(),
  255. drop = "default:copper_lump",
  256. silverpick_drop = true,
  257. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  258. after_destruct = function(...)
  259. after_redrack_remove(...)
  260. end,
  261. })
  262. minetest.register_node("rackstone:redrack_with_coal", {
  263. description = "Netherack With Coal",
  264. tiles = {"rackstone_redrack.png^default_mineral_coal.png"},
  265. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  266. sounds = rackstone.rackstone_sounds(),
  267. drop = "default:coal_lump",
  268. silverpick_drop = true,
  269. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  270. after_destruct = function(...)
  271. after_redrack_remove(...)
  272. end,
  273. })
  274. minetest.register_node("rackstone:redrack_with_tin", {
  275. description = "Netherack With Tin",
  276. tiles = {"rackstone_redrack.png^moreores_mineral_tin.png"},
  277. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  278. sounds = rackstone.rackstone_sounds(),
  279. drop = "moreores:tin_lump",
  280. silverpick_drop = true,
  281. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  282. after_destruct = function(...)
  283. after_redrack_remove(...)
  284. end,
  285. })
  286. minetest.register_node("rackstone:tile", {
  287. description = "Nether Grit Tile",
  288. paramtype2 = "facedir",
  289. place_param2 = 0,
  290. tiles = {"rackstone_redtile.png"},
  291. groups = utility.dig_groups("brick", {brick=1}),
  292. sounds = default.node_sound_stone_defaults(),
  293. })
  294. minetest.register_node("rackstone:brick", {
  295. description = "Netherack Brick",
  296. paramtype2 = "facedir",
  297. place_param2 = 0,
  298. tiles = {"rackstone_brick.png"},
  299. groups = utility.dig_groups("brick", {brick=1}),
  300. sounds = default.node_sound_stone_defaults(),
  301. })
  302. minetest.register_node("rackstone:redrack_block", {
  303. description = "Netherack Block",
  304. paramtype2 = "facedir",
  305. place_param2 = 0,
  306. tiles = {"rackstone_redrack_block.png"},
  307. groups = utility.dig_groups("block"),
  308. sounds = default.node_sound_stone_defaults(),
  309. })
  310. minetest.register_node("rackstone:brick_black", {
  311. description = "Black Rackstone Brick",
  312. paramtype2 = "facedir",
  313. place_param2 = 0,
  314. tiles = {"rackstone_brick_black.png"},
  315. groups = utility.dig_groups("brick", {brick=1}),
  316. sounds = default.node_sound_stone_defaults(),
  317. })
  318. minetest.register_node("rackstone:blackrack_block", {
  319. description = "Black Rackstone Block",
  320. paramtype2 = "facedir",
  321. place_param2 = 0,
  322. tiles = {"rackstone_blackrack_block.png"},
  323. groups = utility.dig_groups("block"),
  324. sounds = default.node_sound_stone_defaults(),
  325. })
  326. minetest.register_node("rackstone:bluerack", {
  327. description = "Blue Rackstone",
  328. tiles = {"rackstone_bluerack.png"},
  329. groups = utility.dig_groups("hardstone", {rackstone=1, netherack=1}),
  330. sounds = rackstone.rackstone_sounds(),
  331. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  332. })
  333. minetest.register_node("rackstone:bluerack_brick", {
  334. description = "Blue Rackstone Brick",
  335. paramtype2 = "facedir",
  336. place_param2 = 0,
  337. tiles = {"rackstone_bluerack_brick.png"},
  338. groups = utility.dig_groups("brick", {rackstone=1, brick=1}),
  339. sounds = rackstone.rackstone_sounds(),
  340. })
  341. minetest.register_node("rackstone:bluerack_block", {
  342. description = "Blue Rackstone Block",
  343. paramtype2 = "facedir",
  344. place_param2 = 0,
  345. tiles = {"rackstone_bluerack_block.png"},
  346. groups = utility.dig_groups("block", {rackstone=1}),
  347. sounds = rackstone.rackstone_sounds(),
  348. })
  349. minetest.register_node("rackstone:blackrack", {
  350. description = "Black Rackstone",
  351. tiles = {"rackstone_blackrack.png"},
  352. groups = utility.dig_groups("cobble", {rackstone=1, native_stone=1, stabilize_dauthsand=1, netherack=1}),
  353. sounds = rackstone.rackstone_sounds(),
  354. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  355. paramtype2 = "none",
  356. after_destruct = rackstone.destabilize_dauthsand,
  357. -- Nodes placed shall not produce starpearls when dug.
  358. after_place_node = function(pos, placer, itemstack, pointed_thing)
  359. if placer then
  360. local node = minetest.get_node(pos)
  361. node.param2 = 1
  362. minetest.swap_node(pos, node)
  363. end
  364. end,
  365. -- Digging nodes placed by mapgen shall sometimes produce starpearls.
  366. after_dig_node = function(pos, oldnode, oldmetadata, digger)
  367. if digger and oldnode.param2 == 0 then
  368. -- Only drop them rarely.
  369. -- Only drop if blackrack was placed by mapgen.
  370. -- This prevents place-harvest-place-harvest exploit.
  371. local chance = 80
  372. local tool = digger:get_wielded_item():get_name()
  373. if tool:find("pick") and tool:find("silver") then
  374. chance = 20
  375. end
  376. if math_random(1, chance) == 1 then
  377. local inv = digger:get_inventory()
  378. local leftover = inv:add_item("main", ItemStack('starpearl:pearl'))
  379. minetest.add_item(pos, leftover)
  380. end
  381. end
  382. end,
  383. })
  384. minetest.register_node("rackstone:evilrack", {
  385. description = "Witchrack",
  386. tiles = {"rackstone_evilstone.png"},
  387. groups = utility.dig_groups("netherack", {falling_node=1, rackstone=1, netherack=1}),
  388. sounds = rackstone.rackstone_sounds(),
  389. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  390. })
  391. minetest.register_node("rackstone:dauthsand", {
  392. description = "Dauthsand",
  393. tiles = {"rackstone_dauthsand.png"},
  394. groups = utility.dig_groups("racksand", {falling_node=1, racksand=1, nether_soil=1}),
  395. --damage_per_second = 4,
  396. post_effect_color = {a=255, r=0, g=0, b=0},
  397. sounds = default.node_sound_gravel_defaults(),
  398. drop = {
  399. items = {
  400. {items = {'bluegrass:seed'}, rarity = 32},
  401. {items = {'rackstone:dauthsand'}},
  402. {items = {'default:flint'}, rarity = 16}
  403. }
  404. },
  405. movement_speed_multiplier = default.SLOW_SPEED,
  406. -- Stabilize dauth sand if held by rackstone.
  407. on_construct = function(pos)
  408. local x1 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name
  409. local x2 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name
  410. local z1 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name
  411. local z2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name
  412. if minetest.get_item_group(x1, "stabilize_dauthsand") > 0 and
  413. minetest.get_item_group(x2, "stabilize_dauthsand") > 0 then
  414. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  415. elseif minetest.get_item_group(z1, "stabilize_dauthsand") > 0 and
  416. minetest.get_item_group(z2, "stabilize_dauthsand") > 0 then
  417. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  418. end
  419. end,
  420. })
  421. -- Special sand type that doesn't fall.
  422. minetest.register_node("rackstone:dauthsand_stable", {
  423. description = "Dauthsand",
  424. tiles = {"rackstone_dauthsand.png"},
  425. groups = utility.dig_groups("gravel", {racksand=1, nether_soil=1}),
  426. --damage_per_second = 4,
  427. post_effect_color = {a=255, r=0, g=0, b=0},
  428. sounds = default.node_sound_gravel_defaults(),
  429. drop = 'rackstone:dauthsand',
  430. movement_speed_multiplier = default.SLOW_SPEED,
  431. })
  432. minetest.register_craft({
  433. type = "cooking",
  434. output = "default:glass",
  435. recipe = "rackstone:dauthsand",
  436. })
  437. -- Netherack Crafts
  438. minetest.register_craft({
  439. output = "rackstone:brick 4",
  440. recipe = {
  441. {"rackstone:redrack", "rackstone:redrack"},
  442. {"rackstone:redrack", "rackstone:redrack"},
  443. }
  444. })
  445. minetest.register_craft({
  446. output = "rackstone:redrack_block 9",
  447. recipe = {
  448. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  449. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  450. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  451. }
  452. })
  453. -- Blue Rackstone Crafts
  454. minetest.register_craft({
  455. output = "rackstone:bluerack_brick 4",
  456. recipe = {
  457. {"rackstone:bluerack", "rackstone:bluerack"},
  458. {"rackstone:bluerack", "rackstone:bluerack"},
  459. }
  460. })
  461. minetest.register_craft({
  462. output = "rackstone:bluerack_block 9",
  463. recipe = {
  464. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  465. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  466. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  467. }
  468. })
  469. -- Black Rackstone Crafts
  470. minetest.register_craft({
  471. output = "rackstone:brick_black 4",
  472. recipe = {
  473. {"rackstone:blackrack", "rackstone:blackrack"},
  474. {"rackstone:blackrack", "rackstone:blackrack"},
  475. }
  476. })
  477. minetest.register_craft({
  478. output = "rackstone:blackrack_block 9",
  479. recipe = {
  480. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  481. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  482. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  483. }
  484. })
  485. -- Rackstone Crafts
  486. minetest.register_craft({
  487. output = "rackstone:rackstone_brick2 4",
  488. recipe = {
  489. {"rackstone:rackstone", "rackstone:rackstone"},
  490. {"rackstone:rackstone", "rackstone:rackstone"},
  491. }
  492. })
  493. minetest.register_craft({
  494. output = "rackstone:rackstone_block 9",
  495. recipe = {
  496. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  497. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  498. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  499. }
  500. })
  501. minetest.register_craft({
  502. type = "cooking",
  503. output = 'rackstone:tile',
  504. recipe = 'rackstone:nether_grit',
  505. cooktime = 20,
  506. })
  507. minetest.register_craft({
  508. type = "cooking",
  509. output = 'rackstone:rackstone',
  510. recipe = 'rackstone:cobble',
  511. cooktime = 6,
  512. })
  513. minetest.register_craft({
  514. type = "cooking",
  515. output = 'rackstone:redrack',
  516. recipe = 'rackstone:redrack_cobble',
  517. cooktime = 3,
  518. })
  519. minetest.register_craft({
  520. type = "grinding",
  521. output = 'rackstone:dauthsand',
  522. recipe = 'rackstone:redrack',
  523. time = 20,
  524. })
  525. minetest.register_craft({
  526. type = "crushing",
  527. output = 'rackstone:nether_grit',
  528. recipe = 'rackstone:redrack',
  529. time = 60*1.0,
  530. })
  531. minetest.register_craft({
  532. type = "crushing",
  533. output = 'rackstone:dauthsand',
  534. recipe = 'rackstone:nether_grit',
  535. time = 60*1.0,
  536. })
  537. -- Rackstone
  538. stairs.register_stair_and_slab(
  539. "rackstone",
  540. "rackstone:rackstone",
  541. {cracky=1},
  542. {"rackstone_rackstone.png"},
  543. "Rackstone",
  544. default.node_sound_stone_defaults()
  545. )
  546. stairs.register_stair_and_slab(
  547. "rackstone_cobble",
  548. "rackstone:cobble",
  549. {cracky=2},
  550. {"rackstone_rackstone_cobble.png"},
  551. "Rackstone Cobble",
  552. default.node_sound_stone_defaults()
  553. )
  554. -- Rackstone Block
  555. stairs.register_stair_and_slab(
  556. "rackstone_block",
  557. "rackstone:rackstone_block",
  558. {cracky=1},
  559. {"rackstone_rackstone_block.png"},
  560. "Rackstone Block",
  561. default.node_sound_stone_defaults()
  562. )
  563. -- Rackstone Brick
  564. stairs.register_stair_and_slab(
  565. "rackstone_brick2",
  566. "rackstone:rackstone_brick2",
  567. {cracky=1},
  568. {"rackstone_rackstone_brick.png"},
  569. "Rackstone Brick",
  570. default.node_sound_stone_defaults()
  571. )
  572. -- Netherack
  573. stairs.register_stair_and_slab(
  574. "redrack",
  575. "rackstone:redrack",
  576. {cracky=3},
  577. {"rackstone_redrack.png"},
  578. "Netherack",
  579. rackstone.rackstone_sounds()
  580. )
  581. stairs.register_stair_and_slab(
  582. "redrack_cobble",
  583. "rackstone:redrack_cobble",
  584. {cracky=3},
  585. {"rackstone_redrack_cobble.png"},
  586. "Cobbled Netherack",
  587. rackstone.rackstone_sounds()
  588. )
  589. -- Netherack Block
  590. stairs.register_stair_and_slab(
  591. "redrack_block",
  592. "rackstone:redrack_block",
  593. {cracky=3},
  594. {"rackstone_redrack_block.png"},
  595. "Netherack Block",
  596. default.node_sound_stone_defaults()
  597. )
  598. -- Netherack Brick
  599. stairs.register_stair_and_slab(
  600. "rackstone_brick",
  601. "rackstone:brick",
  602. {cracky=2},
  603. {"rackstone_brick.png"},
  604. "Rackstone Brick",
  605. default.node_sound_stone_defaults()
  606. )
  607. -- Blue Rackstone
  608. stairs.register_stair_and_slab(
  609. "bluerack",
  610. "rackstone:bluerack",
  611. {cracky=2},
  612. {"rackstone_bluerack.png"},
  613. "Blue Rackstone",
  614. rackstone.rackstone_sounds()
  615. )
  616. -- Blue Rackstone Block
  617. stairs.register_stair_and_slab(
  618. "bluerack_block",
  619. "rackstone:bluerack_block",
  620. {cracky=2},
  621. {"rackstone_bluerack.png"},
  622. "Blue Rackstone Block",
  623. default.node_sound_stone_defaults()
  624. )
  625. -- Blue Rackstone Brick
  626. stairs.register_stair_and_slab(
  627. "bluerack_brick",
  628. "rackstone:bluerack_brick",
  629. {cracky=2},
  630. {"rackstone_bluerack_brick.png"},
  631. "Blue Rackstone Brick",
  632. default.node_sound_stone_defaults()
  633. )
  634. -- Blackrack
  635. stairs.register_stair_and_slab(
  636. "blackrack",
  637. "rackstone:blackrack",
  638. {cracky=2},
  639. {"rackstone_blackrack.png"},
  640. "Black Rackstone",
  641. rackstone.rackstone_sounds()
  642. )
  643. -- Black Rackstone Block
  644. stairs.register_stair_and_slab(
  645. "blackrack_block",
  646. "rackstone:blackrack_block",
  647. {cracky=2},
  648. {"rackstone_blackrack_block.png"},
  649. "Black Rackstone Block",
  650. default.node_sound_stone_defaults()
  651. )
  652. -- Black Rackstone Brick
  653. stairs.register_stair_and_slab(
  654. "rackstone_brick_black",
  655. "rackstone:brick_black",
  656. {cracky=2},
  657. {"rackstone_brick_black.png"},
  658. "Black Rackstone Brick",
  659. default.node_sound_stone_defaults()
  660. )
  661. -- These nodes appear only in the Outback.
  662. -- They have enhanced drops in order to help new players.
  663. minetest.register_node("rackstone:rackstone_with_coal", {
  664. description = "Rackstone With Coal",
  665. tiles = {"rackstone_rackstone.png^default_mineral_coal.png"},
  666. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  667. sounds = default.node_sound_stone_defaults(),
  668. drop = "default:coal_lump 3",
  669. silverpick_drop = true,
  670. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  671. })
  672. minetest.register_node("rackstone:rackstone_with_iron", {
  673. description = "Rackstone With Iron",
  674. tiles = {"rackstone_rackstone.png^default_mineral_iron.png"},
  675. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  676. sounds = default.node_sound_stone_defaults(),
  677. drop = "default:iron_lump 3",
  678. silverpick_drop = true,
  679. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  680. })
  681. minetest.register_node("rackstone:rackstone_with_copper", {
  682. description = "Rackstone With Copper",
  683. tiles = {"rackstone_rackstone.png^default_mineral_copper.png"},
  684. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  685. sounds = default.node_sound_stone_defaults(),
  686. drop = "default:copper_lump 2",
  687. silverpick_drop = true,
  688. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  689. })
  690. minetest.register_node("rackstone:rackstone_with_gold", {
  691. description = "Rackstone With Gold",
  692. tiles = {"rackstone_rackstone.png^default_mineral_gold.png"},
  693. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  694. sounds = default.node_sound_stone_defaults(),
  695. drop = "default:gold_lump 2",
  696. silverpick_drop = true,
  697. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  698. })
  699. minetest.register_node("rackstone:rackstone_with_diamond", {
  700. description = "Rackstone With Diamond",
  701. tiles = {"rackstone_rackstone.png^default_mineral_diamond.png"},
  702. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  703. sounds = default.node_sound_stone_defaults(),
  704. drop = "default:diamond 2",
  705. silverpick_drop = true,
  706. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  707. })
  708. minetest.register_node("rackstone:rackstone_with_mese", {
  709. description = "Rackstone With Mese",
  710. tiles = {"rackstone_rackstone.png^default_mineral_mese.png"},
  711. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  712. sounds = default.node_sound_stone_defaults(),
  713. drop = "default:mese_crystal 2",
  714. silverpick_drop = true,
  715. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  716. })
  717. minetest.register_node("rackstone:rackstone_with_meat", {
  718. description = "Rackstone With Unidentified Meat",
  719. tiles = {"rackstone_rackstone.png^rackstone_meat.png"},
  720. groups = utility.dig_groups("netherack", {rackstone=1, netherack=1}),
  721. sounds = default.node_sound_stone_defaults(),
  722. drop = "mobs:meat_raw 4",
  723. silverpick_drop = true,
  724. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  725. })