init.lua 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  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 = {
  241. "rackstone_redrack.png",
  242. "rackstone_redrack.png",
  243. "rackstone_redrack.png^default_mineral_iron3.png",
  244. "rackstone_redrack.png^default_mineral_iron3.png",
  245. "rackstone_redrack.png^default_mineral_iron3.png",
  246. "rackstone_redrack.png^default_mineral_iron3.png",
  247. },
  248. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore = 1}),
  249. sounds = rackstone.rackstone_sounds(),
  250. drop = "default:iron_lump",
  251. silverpick_drop = true,
  252. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  253. after_destruct = function(...)
  254. after_redrack_remove(...)
  255. end,
  256. })
  257. minetest.register_node("rackstone:redrack_with_copper", {
  258. description = "Netherack With Copper",
  259. tiles = {
  260. "rackstone_redrack.png",
  261. "rackstone_redrack.png",
  262. "rackstone_redrack.png^default_mineral_copper3.png",
  263. "rackstone_redrack.png^default_mineral_copper3.png",
  264. "rackstone_redrack.png^default_mineral_copper3.png",
  265. "rackstone_redrack.png^default_mineral_copper3.png",
  266. },
  267. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  268. sounds = rackstone.rackstone_sounds(),
  269. drop = "default:copper_lump",
  270. silverpick_drop = true,
  271. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  272. after_destruct = function(...)
  273. after_redrack_remove(...)
  274. end,
  275. })
  276. minetest.register_craftitem("rackstone:dauth_lump", {
  277. description = "Dauth Lump",
  278. inventory_image = "rackstone_dauth_lump.png",
  279. })
  280. minetest.register_craft({
  281. type = "fuel",
  282. recipe = "rackstone:dauth_lump",
  283. burntime = 60,
  284. })
  285. minetest.register_node("rackstone:redrack_with_coal", {
  286. description = "Netherack With Coal",
  287. tiles = {
  288. "rackstone_redrack.png",
  289. "rackstone_redrack.png",
  290. "rackstone_redrack.png^default_mineral_coal3.png",
  291. "rackstone_redrack.png^default_mineral_coal3.png",
  292. "rackstone_redrack.png^default_mineral_coal3.png",
  293. "rackstone_redrack.png^default_mineral_coal3.png",
  294. },
  295. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  296. sounds = rackstone.rackstone_sounds(),
  297. drop = "rackstone:dauth_lump",
  298. silverpick_drop = true,
  299. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  300. after_destruct = function(...)
  301. after_redrack_remove(...)
  302. end,
  303. })
  304. minetest.register_node("rackstone:redrack_with_tin", {
  305. description = "Netherack With Tin",
  306. tiles = {
  307. "rackstone_redrack.png",
  308. "rackstone_redrack.png",
  309. "rackstone_redrack.png^moreores_mineral_tin2.png",
  310. "rackstone_redrack.png^moreores_mineral_tin2.png",
  311. "rackstone_redrack.png^moreores_mineral_tin2.png",
  312. "rackstone_redrack.png^moreores_mineral_tin2.png",
  313. },
  314. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  315. sounds = rackstone.rackstone_sounds(),
  316. drop = "moreores:tin_lump",
  317. silverpick_drop = true,
  318. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  319. after_destruct = function(...)
  320. after_redrack_remove(...)
  321. end,
  322. })
  323. minetest.register_node("rackstone:tile", {
  324. description = "Nether Grit Tile",
  325. paramtype2 = "facedir",
  326. place_param2 = 0,
  327. tiles = {"rackstone_redtile.png"},
  328. groups = utility.dig_groups("brick", {brick=1}),
  329. sounds = default.node_sound_stone_defaults(),
  330. })
  331. minetest.register_node("rackstone:brick", {
  332. description = "Netherack Brick",
  333. paramtype2 = "facedir",
  334. place_param2 = 0,
  335. tiles = {"rackstone_brick.png"},
  336. groups = utility.dig_groups("brick", {brick=1}),
  337. sounds = default.node_sound_stone_defaults(),
  338. })
  339. minetest.register_node("rackstone:redrack_block", {
  340. description = "Netherack Block",
  341. paramtype2 = "facedir",
  342. place_param2 = 0,
  343. tiles = {"rackstone_redrack_block.png"},
  344. groups = utility.dig_groups("block"),
  345. sounds = default.node_sound_stone_defaults(),
  346. })
  347. minetest.register_node("rackstone:brick_black", {
  348. description = "Black Rackstone Brick",
  349. paramtype2 = "facedir",
  350. place_param2 = 0,
  351. tiles = {"rackstone_brick_black.png"},
  352. groups = utility.dig_groups("brick", {brick=1}),
  353. sounds = default.node_sound_stone_defaults(),
  354. })
  355. minetest.register_node("rackstone:blackrack_block", {
  356. description = "Black Rackstone Block",
  357. paramtype2 = "facedir",
  358. place_param2 = 0,
  359. tiles = {"rackstone_blackrack_block.png"},
  360. groups = utility.dig_groups("block"),
  361. sounds = default.node_sound_stone_defaults(),
  362. })
  363. minetest.register_node("rackstone:bluerack", {
  364. description = "Blue Rackstone",
  365. tiles = {"rackstone_bluerack.png"},
  366. groups = utility.dig_groups("hardstone", {rackstone=1, netherack=1}),
  367. sounds = rackstone.rackstone_sounds(),
  368. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  369. })
  370. minetest.register_node("rackstone:bluerack_brick", {
  371. description = "Blue Rackstone Brick",
  372. paramtype2 = "facedir",
  373. place_param2 = 0,
  374. tiles = {"rackstone_bluerack_brick.png"},
  375. groups = utility.dig_groups("brick", {rackstone=1, brick=1}),
  376. sounds = rackstone.rackstone_sounds(),
  377. })
  378. minetest.register_node("rackstone:bluerack_block", {
  379. description = "Blue Rackstone Block",
  380. paramtype2 = "facedir",
  381. place_param2 = 0,
  382. tiles = {"rackstone_bluerack_block.png"},
  383. groups = utility.dig_groups("block", {rackstone=1}),
  384. sounds = rackstone.rackstone_sounds(),
  385. })
  386. minetest.register_node("rackstone:blackrack", {
  387. description = "Black Rackstone",
  388. tiles = {"rackstone_blackrack.png"},
  389. groups = utility.dig_groups("cobble", {rackstone=1, native_stone=1, stabilize_dauthsand=1, netherack=1}),
  390. sounds = rackstone.rackstone_sounds(),
  391. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  392. paramtype2 = "none",
  393. after_destruct = rackstone.destabilize_dauthsand,
  394. -- Nodes placed shall not produce starpearls when dug.
  395. after_place_node = function(pos, placer, itemstack, pointed_thing)
  396. if placer then
  397. local node = minetest.get_node(pos)
  398. node.param2 = 1
  399. minetest.swap_node(pos, node)
  400. end
  401. end,
  402. -- Digging nodes placed by mapgen shall sometimes produce starpearls.
  403. after_dig_node = function(pos, oldnode, oldmetadata, digger)
  404. if digger and oldnode.param2 == 0 then
  405. -- Only drop them rarely.
  406. -- Only drop if blackrack was placed by mapgen.
  407. -- This prevents place-harvest-place-harvest exploit.
  408. local chance = 80
  409. local tool = digger:get_wielded_item():get_name()
  410. if tool:find("pick") and tool:find("silver") then
  411. chance = 20
  412. end
  413. if math_random(1, chance) == 1 then
  414. local inv = digger:get_inventory()
  415. local leftover = inv:add_item("main", ItemStack('starpearl:pearl'))
  416. minetest.add_item(pos, leftover)
  417. end
  418. end
  419. end,
  420. })
  421. minetest.register_node("rackstone:evilrack", {
  422. description = "Witchrack",
  423. tiles = {"rackstone_evilstone.png"},
  424. groups = utility.dig_groups("netherack", {falling_node=1, rackstone=1, netherack=1}),
  425. sounds = rackstone.rackstone_sounds(),
  426. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  427. })
  428. minetest.register_node("rackstone:dauthsand", {
  429. description = "Dauthsand",
  430. tiles = {"rackstone_dauthsand.png"},
  431. groups = utility.dig_groups("racksand", {falling_node=1, racksand=1, nether_soil=1}),
  432. --damage_per_second = 4,
  433. post_effect_color = {a=255, r=0, g=0, b=0},
  434. sounds = default.node_sound_gravel_defaults(),
  435. drop = {
  436. items = {
  437. {items = {'bluegrass:seed'}, rarity = 32},
  438. {items = {'rackstone:dauthsand'}},
  439. {items = {'default:flint'}, rarity = 16}
  440. }
  441. },
  442. movement_speed_multiplier = default.SLOW_SPEED,
  443. -- Stabilize dauth sand if held by rackstone.
  444. on_construct = function(pos)
  445. local x1 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name
  446. local x2 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name
  447. local z1 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name
  448. local z2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name
  449. if minetest.get_item_group(x1, "stabilize_dauthsand") > 0 and
  450. minetest.get_item_group(x2, "stabilize_dauthsand") > 0 then
  451. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  452. elseif minetest.get_item_group(z1, "stabilize_dauthsand") > 0 and
  453. minetest.get_item_group(z2, "stabilize_dauthsand") > 0 then
  454. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  455. end
  456. end,
  457. })
  458. -- Special sand type that doesn't fall.
  459. minetest.register_node("rackstone:dauthsand_stable", {
  460. description = "Dauthsand",
  461. tiles = {"rackstone_dauthsand.png"},
  462. groups = utility.dig_groups("gravel", {racksand=1, nether_soil=1}),
  463. --damage_per_second = 4,
  464. post_effect_color = {a=255, r=0, g=0, b=0},
  465. sounds = default.node_sound_gravel_defaults(),
  466. drop = 'rackstone:dauthsand',
  467. movement_speed_multiplier = default.SLOW_SPEED,
  468. })
  469. minetest.register_craft({
  470. type = "cooking",
  471. output = "default:glass",
  472. recipe = "rackstone:dauthsand",
  473. })
  474. -- Netherack Crafts
  475. minetest.register_craft({
  476. output = "rackstone:brick 4",
  477. recipe = {
  478. {"rackstone:redrack", "rackstone:redrack"},
  479. {"rackstone:redrack", "rackstone:redrack"},
  480. }
  481. })
  482. minetest.register_craft({
  483. output = "rackstone:redrack_block 9",
  484. recipe = {
  485. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  486. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  487. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  488. }
  489. })
  490. -- Blue Rackstone Crafts
  491. minetest.register_craft({
  492. output = "rackstone:bluerack_brick 4",
  493. recipe = {
  494. {"rackstone:bluerack", "rackstone:bluerack"},
  495. {"rackstone:bluerack", "rackstone:bluerack"},
  496. }
  497. })
  498. minetest.register_craft({
  499. output = "rackstone:bluerack_block 9",
  500. recipe = {
  501. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  502. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  503. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  504. }
  505. })
  506. -- Black Rackstone Crafts
  507. minetest.register_craft({
  508. output = "rackstone:brick_black 4",
  509. recipe = {
  510. {"rackstone:blackrack", "rackstone:blackrack"},
  511. {"rackstone:blackrack", "rackstone:blackrack"},
  512. }
  513. })
  514. minetest.register_craft({
  515. output = "rackstone:blackrack_block 9",
  516. recipe = {
  517. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  518. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  519. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  520. }
  521. })
  522. -- Rackstone Crafts
  523. minetest.register_craft({
  524. output = "rackstone:rackstone_brick2 4",
  525. recipe = {
  526. {"rackstone:rackstone", "rackstone:rackstone"},
  527. {"rackstone:rackstone", "rackstone:rackstone"},
  528. }
  529. })
  530. minetest.register_craft({
  531. output = "rackstone:rackstone_block 9",
  532. recipe = {
  533. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  534. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  535. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  536. }
  537. })
  538. minetest.register_craft({
  539. type = "cooking",
  540. output = 'rackstone:tile',
  541. recipe = 'rackstone:nether_grit',
  542. cooktime = 20,
  543. })
  544. minetest.register_craft({
  545. type = "cooking",
  546. output = 'rackstone:rackstone',
  547. recipe = 'rackstone:cobble',
  548. cooktime = 6,
  549. })
  550. minetest.register_craft({
  551. type = "cooking",
  552. output = 'rackstone:redrack',
  553. recipe = 'rackstone:redrack_cobble',
  554. cooktime = 3,
  555. })
  556. minetest.register_craft({
  557. type = "grinding",
  558. output = 'rackstone:dauthsand',
  559. recipe = 'rackstone:redrack',
  560. time = 20,
  561. })
  562. minetest.register_craft({
  563. type = "crushing",
  564. output = 'rackstone:nether_grit',
  565. recipe = 'rackstone:redrack',
  566. time = 60*1.0,
  567. })
  568. minetest.register_craft({
  569. type = "crushing",
  570. output = 'rackstone:dauthsand',
  571. recipe = 'rackstone:nether_grit',
  572. time = 60*1.0,
  573. })
  574. -- Rackstone
  575. stairs.register_stair_and_slab(
  576. "rackstone",
  577. "rackstone:rackstone",
  578. {cracky=1},
  579. {"rackstone_rackstone.png"},
  580. "Rackstone",
  581. default.node_sound_stone_defaults()
  582. )
  583. stairs.register_stair_and_slab(
  584. "rackstone_cobble",
  585. "rackstone:cobble",
  586. {cracky=2},
  587. {"rackstone_rackstone_cobble.png"},
  588. "Rackstone Cobble",
  589. default.node_sound_stone_defaults()
  590. )
  591. -- Rackstone Block
  592. stairs.register_stair_and_slab(
  593. "rackstone_block",
  594. "rackstone:rackstone_block",
  595. {cracky=1},
  596. {"rackstone_rackstone_block.png"},
  597. "Rackstone Block",
  598. default.node_sound_stone_defaults()
  599. )
  600. -- Rackstone Brick
  601. stairs.register_stair_and_slab(
  602. "rackstone_brick2",
  603. "rackstone:rackstone_brick2",
  604. {cracky=1},
  605. {"rackstone_rackstone_brick.png"},
  606. "Rackstone Brick",
  607. default.node_sound_stone_defaults()
  608. )
  609. -- Netherack
  610. stairs.register_stair_and_slab(
  611. "redrack",
  612. "rackstone:redrack",
  613. {cracky=3},
  614. {"rackstone_redrack.png"},
  615. "Netherack",
  616. rackstone.rackstone_sounds()
  617. )
  618. stairs.register_stair_and_slab(
  619. "redrack_cobble",
  620. "rackstone:redrack_cobble",
  621. {cracky=3},
  622. {"rackstone_redrack_cobble.png"},
  623. "Cobbled Netherack",
  624. rackstone.rackstone_sounds()
  625. )
  626. -- Netherack Block
  627. stairs.register_stair_and_slab(
  628. "redrack_block",
  629. "rackstone:redrack_block",
  630. {cracky=3},
  631. {"rackstone_redrack_block.png"},
  632. "Netherack Block",
  633. default.node_sound_stone_defaults()
  634. )
  635. -- Netherack Brick
  636. stairs.register_stair_and_slab(
  637. "rackstone_brick",
  638. "rackstone:brick",
  639. {cracky=2},
  640. {"rackstone_brick.png"},
  641. "Rackstone Brick",
  642. default.node_sound_stone_defaults()
  643. )
  644. -- Blue Rackstone
  645. stairs.register_stair_and_slab(
  646. "bluerack",
  647. "rackstone:bluerack",
  648. {cracky=2},
  649. {"rackstone_bluerack.png"},
  650. "Blue Rackstone",
  651. rackstone.rackstone_sounds()
  652. )
  653. -- Blue Rackstone Block
  654. stairs.register_stair_and_slab(
  655. "bluerack_block",
  656. "rackstone:bluerack_block",
  657. {cracky=2},
  658. {"rackstone_bluerack.png"},
  659. "Blue Rackstone Block",
  660. default.node_sound_stone_defaults()
  661. )
  662. -- Blue Rackstone Brick
  663. stairs.register_stair_and_slab(
  664. "bluerack_brick",
  665. "rackstone:bluerack_brick",
  666. {cracky=2},
  667. {"rackstone_bluerack_brick.png"},
  668. "Blue Rackstone Brick",
  669. default.node_sound_stone_defaults()
  670. )
  671. -- Blackrack
  672. stairs.register_stair_and_slab(
  673. "blackrack",
  674. "rackstone:blackrack",
  675. {cracky=2},
  676. {"rackstone_blackrack.png"},
  677. "Black Rackstone",
  678. rackstone.rackstone_sounds()
  679. )
  680. -- Black Rackstone Block
  681. stairs.register_stair_and_slab(
  682. "blackrack_block",
  683. "rackstone:blackrack_block",
  684. {cracky=2},
  685. {"rackstone_blackrack_block.png"},
  686. "Black Rackstone Block",
  687. default.node_sound_stone_defaults()
  688. )
  689. -- Black Rackstone Brick
  690. stairs.register_stair_and_slab(
  691. "rackstone_brick_black",
  692. "rackstone:brick_black",
  693. {cracky=2},
  694. {"rackstone_brick_black.png"},
  695. "Black Rackstone Brick",
  696. default.node_sound_stone_defaults()
  697. )
  698. -- These nodes appear only in the Outback.
  699. -- They have enhanced drops in order to help new players.
  700. minetest.register_node("rackstone:rackstone_with_coal", {
  701. description = "Rackstone With Coal",
  702. tiles = {"rackstone_rackstone.png^default_mineral_coal.png"},
  703. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  704. sounds = default.node_sound_stone_defaults(),
  705. drop = "default:coal_lump 3",
  706. silverpick_drop = true,
  707. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  708. })
  709. minetest.register_node("rackstone:rackstone_with_iron", {
  710. description = "Rackstone With Iron",
  711. tiles = {"rackstone_rackstone.png^default_mineral_iron.png"},
  712. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  713. sounds = default.node_sound_stone_defaults(),
  714. drop = "default:iron_lump 3",
  715. silverpick_drop = true,
  716. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  717. })
  718. minetest.register_node("rackstone:rackstone_with_copper", {
  719. description = "Rackstone With Copper",
  720. tiles = {"rackstone_rackstone.png^default_mineral_copper.png"},
  721. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  722. sounds = default.node_sound_stone_defaults(),
  723. drop = "default:copper_lump 2",
  724. silverpick_drop = true,
  725. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  726. })
  727. minetest.register_node("rackstone:rackstone_with_gold", {
  728. description = "Rackstone With Gold",
  729. tiles = {"rackstone_rackstone.png^default_mineral_gold.png"},
  730. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  731. sounds = default.node_sound_stone_defaults(),
  732. drop = "default:gold_lump 2",
  733. silverpick_drop = true,
  734. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  735. })
  736. minetest.register_node("rackstone:rackstone_with_diamond", {
  737. description = "Rackstone With Diamond",
  738. tiles = {"rackstone_rackstone.png^default_mineral_diamond.png"},
  739. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  740. sounds = default.node_sound_stone_defaults(),
  741. drop = "default:diamond 2",
  742. silverpick_drop = true,
  743. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  744. })
  745. minetest.register_node("rackstone:rackstone_with_mese", {
  746. description = "Rackstone With Mese",
  747. tiles = {"rackstone_rackstone.png^default_mineral_mese.png"},
  748. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  749. sounds = default.node_sound_stone_defaults(),
  750. drop = "default:mese_crystal 2",
  751. silverpick_drop = true,
  752. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  753. })
  754. minetest.register_node("rackstone:rackstone_with_meat", {
  755. description = "Rackstone With Unidentified Meat",
  756. tiles = {"rackstone_rackstone.png^rackstone_meat.png"},
  757. groups = utility.dig_groups("netherack", {rackstone=1, netherack=1}),
  758. sounds = default.node_sound_stone_defaults(),
  759. drop = "mobs:meat_raw 4",
  760. silverpick_drop = true,
  761. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  762. })