init.lua 25 KB

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