init.lua 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  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 = {
  140. max_items = 1,
  141. items = {
  142. {
  143. rarity = 2,
  144. tool_groups = {
  145. "gem_tool",
  146. },
  147. items = {},
  148. },
  149. {
  150. rarity = 1,
  151. items = {"rackstone:redrack_cobble"},
  152. }
  153. },
  154. },
  155. -- Common stone does not count toward tool's dig count.
  156. _toolranks = {
  157. ignore = true,
  158. },
  159. -- Otherwise the nether will be pitch black.
  160. light_source = 2,
  161. after_destruct = function(...)
  162. after_redrack_remove(...)
  163. rackstone.destabilize_dauthsand(...)
  164. end,
  165. on_construct = function(...)
  166. on_redrack_place(...)
  167. end,
  168. on_player_walk_over = function(pos, player)
  169. if math_random(1, 2000) == 1 then
  170. minetest.after(math_random(1, 4), function()
  171. if not minetest.test_protection(pos, "") then
  172. tnt.boom(pos, {
  173. radius = 2,
  174. ignore_protection = false,
  175. ignore_on_blast = false,
  176. damage_radius = 3,
  177. disable_drops = true,
  178. })
  179. end
  180. end)
  181. end
  182. end,
  183. })
  184. minetest.register_node("rackstone:redrack_cobble", {
  185. description = "Cobbled Netherack",
  186. tiles = {"rackstone_redrack_cobble.png"},
  187. groups = utility.dig_groups("netherack", {rackstone=1, stabilize_dauthsand=1, netherack=1}),
  188. sounds = rackstone.rackstone_sounds(),
  189. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  190. -- Common stone does not count toward tool's dig count.
  191. _toolranks = {
  192. ignore = true,
  193. },
  194. _no_auto_pop = true,
  195. after_destruct = function(...)
  196. rackstone.destabilize_dauthsand(...)
  197. end,
  198. on_construct = function(...)
  199. on_redrack_place(...)
  200. end,
  201. on_player_walk_over = function(pos, player)
  202. if math_random(1, 10000) == 1 then
  203. minetest.after(math_random(1, 4), function()
  204. if not minetest.test_protection(pos, "") then
  205. tnt.boom(pos, {
  206. radius = 2,
  207. ignore_protection = false,
  208. ignore_on_blast = false,
  209. damage_radius = 2,
  210. disable_drops = true,
  211. })
  212. end
  213. end)
  214. end
  215. end,
  216. })
  217. minetest.register_node("rackstone:nether_grit", {
  218. description = "Nether Grit",
  219. tiles = {"rackstone_redrack2.png"},
  220. groups = utility.dig_groups("racksand", {falling_node=1, disable_jump=1}),
  221. sounds = rackstone.rackstone_sounds(),
  222. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  223. liquid_viscosity = 8,
  224. liquidtype = "source",
  225. liquid_alternative_flowing = "rackstone:nether_grit",
  226. liquid_alternative_source = "rackstone:nether_grit",
  227. liquid_renewable = false,
  228. liquid_range = 0,
  229. walkable = false,
  230. -- This was an attempt to make the pathfinder avoid these nodes, but by making
  231. -- the node walkable, the pathfinder just generates paths that go *over* them,
  232. -- anyway.
  233. --walkable = true,
  234. --collision_box = {type="fixed", fixed={0,0,0, 0,0,0}},
  235. drawtype = "glasslike",
  236. paramtype = "light",
  237. post_effect_color = {a = 200, r = 30, g = 0, b = 0},
  238. damage_per_second = 1,
  239. drop = {
  240. max_items = 1,
  241. items = {
  242. {items = {'default:flint'}, rarity = 16},
  243. {items = {'rackstone:nether_grit'}}
  244. }
  245. },
  246. })
  247. minetest.register_node("rackstone:void", {
  248. description = "Nether Void Gap (You Hacker!)",
  249. tiles = {"rackstone_redrack.png"},
  250. groups = utility.dig_groups("cobble"),
  251. sounds = rackstone.rackstone_sounds(),
  252. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  253. walkable = false,
  254. drawtype = "glasslike",
  255. paramtype = "light",
  256. post_effect_color = {a = 200, r = 30, g = 0, b = 0},
  257. damage_per_second = 1,
  258. drop = "",
  259. })
  260. minetest.register_node("rackstone:redrack_with_iron", {
  261. description = "Netherack With Iron",
  262. tiles = {
  263. "rackstone_redrack.png",
  264. "rackstone_redrack.png",
  265. "rackstone_redrack.png^default_mineral_iron3.png",
  266. "rackstone_redrack.png^default_mineral_iron3.png",
  267. "rackstone_redrack.png^default_mineral_iron3.png",
  268. "rackstone_redrack.png^default_mineral_iron3.png",
  269. },
  270. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore = 1}),
  271. sounds = rackstone.rackstone_sounds(),
  272. drop = "default:iron_lump",
  273. silverpick_drop = true,
  274. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  275. place_param2 = 10,
  276. after_destruct = function(...)
  277. after_redrack_remove(...)
  278. end,
  279. })
  280. minetest.register_node("rackstone:redrack_with_copper", {
  281. description = "Netherack With Copper",
  282. tiles = {
  283. "rackstone_redrack.png",
  284. "rackstone_redrack.png",
  285. "rackstone_redrack.png^default_mineral_copper3.png",
  286. "rackstone_redrack.png^default_mineral_copper3.png",
  287. "rackstone_redrack.png^default_mineral_copper3.png",
  288. "rackstone_redrack.png^default_mineral_copper3.png",
  289. },
  290. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  291. sounds = rackstone.rackstone_sounds(),
  292. drop = "default:copper_lump",
  293. silverpick_drop = true,
  294. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  295. place_param2 = 10,
  296. after_destruct = function(...)
  297. after_redrack_remove(...)
  298. end,
  299. })
  300. minetest.register_craftitem("rackstone:dauth_lump", {
  301. description = "Dauth Lump",
  302. inventory_image = "rackstone_dauth_lump.png",
  303. })
  304. minetest.register_craft({
  305. type = "fuel",
  306. recipe = "rackstone:dauth_lump",
  307. burntime = 60,
  308. })
  309. minetest.register_node("rackstone:redrack_with_coal", {
  310. description = "Netherack With Dauth",
  311. tiles = {
  312. "rackstone_redrack.png",
  313. "rackstone_redrack.png",
  314. "rackstone_redrack.png^default_mineral_coal3.png",
  315. "rackstone_redrack.png^default_mineral_coal3.png",
  316. "rackstone_redrack.png^default_mineral_coal3.png",
  317. "rackstone_redrack.png^default_mineral_coal3.png",
  318. },
  319. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  320. sounds = rackstone.rackstone_sounds(),
  321. drop = "rackstone:dauth_lump",
  322. silverpick_drop = true,
  323. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  324. place_param2 = 10,
  325. after_destruct = function(...)
  326. after_redrack_remove(...)
  327. end,
  328. })
  329. minetest.register_node("rackstone:redrack_with_tin", {
  330. description = "Netherack With Tin",
  331. tiles = {
  332. "rackstone_redrack.png",
  333. "rackstone_redrack.png",
  334. "rackstone_redrack.png^moreores_mineral_tin2.png",
  335. "rackstone_redrack.png^moreores_mineral_tin2.png",
  336. "rackstone_redrack.png^moreores_mineral_tin2.png",
  337. "rackstone_redrack.png^moreores_mineral_tin2.png",
  338. },
  339. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1, ore=1}),
  340. sounds = rackstone.rackstone_sounds(),
  341. drop = "moreores:tin_lump",
  342. silverpick_drop = true,
  343. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  344. place_param2 = 10,
  345. after_destruct = function(...)
  346. after_redrack_remove(...)
  347. end,
  348. })
  349. minetest.register_node("rackstone:tile", {
  350. description = "Nether Grit Tile",
  351. paramtype2 = "facedir",
  352. place_param2 = 0,
  353. tiles = {"rackstone_redtile.png"},
  354. groups = utility.dig_groups("brick", {brick=1}),
  355. sounds = default.node_sound_stone_defaults(),
  356. })
  357. minetest.register_node("rackstone:brick", {
  358. description = "Netherack Brick",
  359. paramtype2 = "facedir",
  360. place_param2 = 0,
  361. tiles = {"rackstone_brick.png"},
  362. groups = utility.dig_groups("brick", {brick=1}),
  363. sounds = default.node_sound_stone_defaults(),
  364. })
  365. minetest.register_node("rackstone:redrack_block", {
  366. description = "Netherack Block",
  367. paramtype2 = "facedir",
  368. place_param2 = 0,
  369. tiles = {"rackstone_redrack_block.png"},
  370. groups = utility.dig_groups("block"),
  371. sounds = default.node_sound_stone_defaults(),
  372. })
  373. minetest.register_node("rackstone:brick_black", {
  374. description = "Black Rackstone Brick",
  375. paramtype2 = "facedir",
  376. place_param2 = 0,
  377. tiles = {"rackstone_brick_black.png"},
  378. groups = utility.dig_groups("brick", {brick=1}),
  379. sounds = default.node_sound_stone_defaults(),
  380. })
  381. minetest.register_node("rackstone:blackrack_block", {
  382. description = "Black Rackstone Block",
  383. paramtype2 = "facedir",
  384. place_param2 = 0,
  385. tiles = {"rackstone_blackrack_block.png"},
  386. groups = utility.dig_groups("block"),
  387. sounds = default.node_sound_stone_defaults(),
  388. })
  389. minetest.register_node("rackstone:bluerack", {
  390. description = "Blue Rackstone",
  391. tiles = {"rackstone_bluerack.png"},
  392. groups = utility.dig_groups("hardstone", {rackstone=1, netherack=1}),
  393. sounds = rackstone.rackstone_sounds(),
  394. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  395. })
  396. minetest.register_node("rackstone:bluerack_brick", {
  397. description = "Blue Rackstone Brick",
  398. paramtype2 = "facedir",
  399. place_param2 = 0,
  400. tiles = {"rackstone_bluerack_brick.png"},
  401. groups = utility.dig_groups("brick", {rackstone=1, brick=1}),
  402. sounds = rackstone.rackstone_sounds(),
  403. })
  404. minetest.register_node("rackstone:bluerack_block", {
  405. description = "Blue Rackstone Block",
  406. paramtype2 = "facedir",
  407. place_param2 = 0,
  408. tiles = {"rackstone_bluerack_block.png"},
  409. groups = utility.dig_groups("block", {rackstone=1}),
  410. sounds = rackstone.rackstone_sounds(),
  411. })
  412. minetest.register_node("rackstone:blackrack", {
  413. description = "Black Rackstone",
  414. tiles = {"rackstone_blackrack.png"},
  415. groups = utility.dig_groups("cobble", {rackstone=1, native_stone=1, stabilize_dauthsand=1, netherack=1}),
  416. sounds = rackstone.rackstone_sounds(),
  417. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  418. paramtype2 = "none",
  419. after_destruct = rackstone.destabilize_dauthsand,
  420. -- Nodes placed shall not produce starpearls when dug.
  421. after_place_node = function(pos, placer, itemstack, pointed_thing)
  422. if placer then
  423. local node = minetest.get_node(pos)
  424. node.param2 = 1
  425. minetest.swap_node(pos, node)
  426. end
  427. end,
  428. -- Digging nodes placed by mapgen shall sometimes produce starpearls.
  429. after_dig_node = function(pos, oldnode, oldmetadata, digger)
  430. if digger and oldnode.param2 == 0 then
  431. -- Only drop them rarely.
  432. -- Only drop if blackrack was placed by mapgen.
  433. -- This prevents place-harvest-place-harvest exploit.
  434. local chance = 80
  435. local tool = digger:get_wielded_item():get_name()
  436. if tool:find("pick") and tool:find("silver") then
  437. chance = 20
  438. end
  439. if math_random(1, chance) == 1 then
  440. local inv = digger:get_inventory()
  441. local leftover = inv:add_item("main", ItemStack('starpearl:pearl'))
  442. minetest.add_item(pos, leftover)
  443. end
  444. end
  445. end,
  446. })
  447. minetest.register_node("rackstone:evilrack", {
  448. description = "Witchrack",
  449. tiles = {"rackstone_evilstone.png"},
  450. groups = utility.dig_groups("netherack", {falling_node=1, rackstone=1, netherack=1}),
  451. sounds = rackstone.rackstone_sounds(),
  452. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  453. })
  454. minetest.register_node("rackstone:dauthsand", {
  455. description = "Dauthsand",
  456. tiles = {"rackstone_dauthsand.png"},
  457. groups = utility.dig_groups("racksand", {falling_node=1, racksand=1, nether_soil=1}),
  458. --damage_per_second = 4,
  459. post_effect_color = {a=255, r=0, g=0, b=0},
  460. sounds = default.node_sound_gravel_defaults(),
  461. drop = {
  462. items = {
  463. {items = {'bluegrass:seed'}, rarity = 32},
  464. {items = {'rackstone:dauthsand'}},
  465. {items = {'default:flint'}, rarity = 16}
  466. }
  467. },
  468. movement_speed_multiplier = default.SLOW_SPEED,
  469. -- Stabilize dauth sand if held by rackstone.
  470. on_construct = function(pos)
  471. local x1 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name
  472. local x2 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name
  473. local z1 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name
  474. local z2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name
  475. if minetest.get_item_group(x1, "stabilize_dauthsand") > 0 and
  476. minetest.get_item_group(x2, "stabilize_dauthsand") > 0 then
  477. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  478. elseif minetest.get_item_group(z1, "stabilize_dauthsand") > 0 and
  479. minetest.get_item_group(z2, "stabilize_dauthsand") > 0 then
  480. minetest.swap_node(pos, {name="rackstone:dauthsand_stable"})
  481. end
  482. end,
  483. })
  484. -- Special sand type that doesn't fall.
  485. minetest.register_node("rackstone:dauthsand_stable", {
  486. description = "Dauthsand",
  487. tiles = {"rackstone_dauthsand.png"},
  488. groups = utility.dig_groups("gravel", {racksand=1, nether_soil=1}),
  489. --damage_per_second = 4,
  490. post_effect_color = {a=255, r=0, g=0, b=0},
  491. sounds = default.node_sound_gravel_defaults(),
  492. drop = 'rackstone:dauthsand',
  493. movement_speed_multiplier = default.SLOW_SPEED,
  494. })
  495. minetest.register_craft({
  496. type = "cooking",
  497. output = "default:glass",
  498. recipe = "rackstone:dauthsand",
  499. })
  500. -- Netherack Crafts
  501. minetest.register_craft({
  502. output = "rackstone:brick 4",
  503. recipe = {
  504. {"rackstone:redrack", "rackstone:redrack"},
  505. {"rackstone:redrack", "rackstone:redrack"},
  506. }
  507. })
  508. minetest.register_craft({
  509. output = "rackstone:redrack_block 9",
  510. recipe = {
  511. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  512. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  513. {"rackstone:redrack", "rackstone:redrack", "rackstone:redrack"},
  514. }
  515. })
  516. -- Blue Rackstone Crafts
  517. minetest.register_craft({
  518. output = "rackstone:bluerack_brick 4",
  519. recipe = {
  520. {"rackstone:bluerack", "rackstone:bluerack"},
  521. {"rackstone:bluerack", "rackstone:bluerack"},
  522. }
  523. })
  524. minetest.register_craft({
  525. output = "rackstone:bluerack_block 9",
  526. recipe = {
  527. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  528. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  529. {"rackstone:bluerack", "rackstone:bluerack", "rackstone:bluerack"},
  530. }
  531. })
  532. -- Black Rackstone Crafts
  533. minetest.register_craft({
  534. output = "rackstone:brick_black 4",
  535. recipe = {
  536. {"rackstone:blackrack", "rackstone:blackrack"},
  537. {"rackstone:blackrack", "rackstone:blackrack"},
  538. }
  539. })
  540. minetest.register_craft({
  541. output = "rackstone:blackrack_block 9",
  542. recipe = {
  543. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  544. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  545. {"rackstone:blackrack", "rackstone:blackrack", "rackstone:blackrack"},
  546. }
  547. })
  548. -- Rackstone Crafts
  549. minetest.register_craft({
  550. output = "rackstone:rackstone_brick2 4",
  551. recipe = {
  552. {"rackstone:rackstone", "rackstone:rackstone"},
  553. {"rackstone:rackstone", "rackstone:rackstone"},
  554. }
  555. })
  556. minetest.register_craft({
  557. output = "rackstone:rackstone_block 9",
  558. recipe = {
  559. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  560. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  561. {"rackstone:rackstone", "rackstone:rackstone", "rackstone:rackstone"},
  562. }
  563. })
  564. minetest.register_craft({
  565. type = "cooking",
  566. output = 'rackstone:tile',
  567. recipe = 'rackstone:nether_grit',
  568. cooktime = 20,
  569. })
  570. minetest.register_craft({
  571. type = "cooking",
  572. output = 'rackstone:rackstone',
  573. recipe = 'rackstone:cobble',
  574. cooktime = 6,
  575. })
  576. minetest.register_craft({
  577. type = "cooking",
  578. output = 'rackstone:redrack',
  579. recipe = 'rackstone:redrack_cobble',
  580. cooktime = 3,
  581. })
  582. minetest.register_craft({
  583. type = "grinding",
  584. output = 'rackstone:dauthsand',
  585. recipe = 'rackstone:redrack',
  586. time = 20,
  587. })
  588. minetest.register_craft({
  589. type = "crushing",
  590. output = 'rackstone:nether_grit',
  591. recipe = 'rackstone:redrack',
  592. time = 60*1.0,
  593. })
  594. minetest.register_craft({
  595. type = "crushing",
  596. output = 'rackstone:dauthsand',
  597. recipe = 'rackstone:nether_grit',
  598. time = 60*1.0,
  599. })
  600. -- Rackstone
  601. stairs.register_stair_and_slab(
  602. "rackstone",
  603. "rackstone:rackstone",
  604. {cracky=1},
  605. {"rackstone_rackstone.png"},
  606. "Rackstone",
  607. default.node_sound_stone_defaults()
  608. )
  609. stairs.register_stair_and_slab(
  610. "rackstone_cobble",
  611. "rackstone:cobble",
  612. {cracky=2},
  613. {"rackstone_rackstone_cobble.png"},
  614. "Rackstone Cobble",
  615. default.node_sound_stone_defaults()
  616. )
  617. -- Rackstone Block
  618. stairs.register_stair_and_slab(
  619. "rackstone_block",
  620. "rackstone:rackstone_block",
  621. {cracky=1},
  622. {"rackstone_rackstone_block.png"},
  623. "Rackstone Block",
  624. default.node_sound_stone_defaults()
  625. )
  626. -- Rackstone Brick
  627. stairs.register_stair_and_slab(
  628. "rackstone_brick2",
  629. "rackstone:rackstone_brick2",
  630. {cracky=1},
  631. {"rackstone_rackstone_brick.png"},
  632. "Rackstone Brick",
  633. default.node_sound_stone_defaults()
  634. )
  635. -- Netherack
  636. stairs.register_stair_and_slab(
  637. "redrack",
  638. "rackstone:redrack",
  639. {cracky=3},
  640. {"rackstone_redrack.png"},
  641. "Netherack",
  642. rackstone.rackstone_sounds()
  643. )
  644. stairs.register_stair_and_slab(
  645. "redrack_cobble",
  646. "rackstone:redrack_cobble",
  647. {cracky=3},
  648. {"rackstone_redrack_cobble.png"},
  649. "Cobbled Netherack",
  650. rackstone.rackstone_sounds()
  651. )
  652. -- Netherack Block
  653. stairs.register_stair_and_slab(
  654. "redrack_block",
  655. "rackstone:redrack_block",
  656. {cracky=3},
  657. {"rackstone_redrack_block.png"},
  658. "Netherack Block",
  659. default.node_sound_stone_defaults()
  660. )
  661. -- Netherack Brick
  662. stairs.register_stair_and_slab(
  663. "rackstone_brick",
  664. "rackstone:brick",
  665. {cracky=2},
  666. {"rackstone_brick.png"},
  667. "Rackstone Brick",
  668. default.node_sound_stone_defaults()
  669. )
  670. -- Blue Rackstone
  671. stairs.register_stair_and_slab(
  672. "bluerack",
  673. "rackstone:bluerack",
  674. {cracky=2},
  675. {"rackstone_bluerack.png"},
  676. "Blue Rackstone",
  677. rackstone.rackstone_sounds()
  678. )
  679. -- Blue Rackstone Block
  680. stairs.register_stair_and_slab(
  681. "bluerack_block",
  682. "rackstone:bluerack_block",
  683. {cracky=2},
  684. {"rackstone_bluerack.png"},
  685. "Blue Rackstone Block",
  686. default.node_sound_stone_defaults()
  687. )
  688. -- Blue Rackstone Brick
  689. stairs.register_stair_and_slab(
  690. "bluerack_brick",
  691. "rackstone:bluerack_brick",
  692. {cracky=2},
  693. {"rackstone_bluerack_brick.png"},
  694. "Blue Rackstone Brick",
  695. default.node_sound_stone_defaults()
  696. )
  697. -- Blackrack
  698. stairs.register_stair_and_slab(
  699. "blackrack",
  700. "rackstone:blackrack",
  701. {cracky=2},
  702. {"rackstone_blackrack.png"},
  703. "Black Rackstone",
  704. rackstone.rackstone_sounds()
  705. )
  706. -- Black Rackstone Block
  707. stairs.register_stair_and_slab(
  708. "blackrack_block",
  709. "rackstone:blackrack_block",
  710. {cracky=2},
  711. {"rackstone_blackrack_block.png"},
  712. "Black Rackstone Block",
  713. default.node_sound_stone_defaults()
  714. )
  715. -- Black Rackstone Brick
  716. stairs.register_stair_and_slab(
  717. "rackstone_brick_black",
  718. "rackstone:brick_black",
  719. {cracky=2},
  720. {"rackstone_brick_black.png"},
  721. "Black Rackstone Brick",
  722. default.node_sound_stone_defaults()
  723. )
  724. -- These nodes appear only in the Outback.
  725. -- They have enhanced drops in order to help new players.
  726. minetest.register_node("rackstone:rackstone_with_coal", {
  727. description = "Rackstone With Coal",
  728. tiles = {"rackstone_rackstone.png^default_mineral_coal.png"},
  729. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  730. sounds = default.node_sound_stone_defaults(),
  731. drop = "default:coal_lump 3",
  732. silverpick_drop = true,
  733. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  734. place_param2 = 10,
  735. })
  736. minetest.register_node("rackstone:rackstone_with_iron", {
  737. description = "Rackstone With Iron",
  738. tiles = {"rackstone_rackstone.png^default_mineral_iron.png"},
  739. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  740. sounds = default.node_sound_stone_defaults(),
  741. drop = "default:iron_lump 3",
  742. silverpick_drop = true,
  743. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  744. place_param2 = 10,
  745. })
  746. minetest.register_node("rackstone:rackstone_with_copper", {
  747. description = "Rackstone With Copper",
  748. tiles = {"rackstone_rackstone.png^default_mineral_copper.png"},
  749. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  750. sounds = default.node_sound_stone_defaults(),
  751. drop = "default:copper_lump 2",
  752. silverpick_drop = true,
  753. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  754. place_param2 = 10,
  755. })
  756. minetest.register_node("rackstone:rackstone_with_gold", {
  757. description = "Rackstone With Gold",
  758. tiles = {"rackstone_rackstone.png^default_mineral_gold.png"},
  759. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  760. sounds = default.node_sound_stone_defaults(),
  761. drop = "default:gold_lump 2",
  762. silverpick_drop = true,
  763. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  764. place_param2 = 10,
  765. })
  766. minetest.register_node("rackstone:rackstone_with_diamond", {
  767. description = "Rackstone With Diamond",
  768. tiles = {"rackstone_rackstone.png^default_mineral_diamond.png"},
  769. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  770. sounds = default.node_sound_stone_defaults(),
  771. drop = "default:diamond 2",
  772. silverpick_drop = true,
  773. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  774. place_param2 = 10,
  775. })
  776. minetest.register_node("rackstone:rackstone_with_mese", {
  777. description = "Rackstone With Mese",
  778. tiles = {"rackstone_rackstone.png^default_mineral_mese.png"},
  779. groups = utility.dig_groups("mineral", {rackstone=1, netherack=1}),
  780. sounds = default.node_sound_stone_defaults(),
  781. drop = "default:mese_crystal 2",
  782. silverpick_drop = true,
  783. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  784. place_param2 = 10,
  785. })
  786. minetest.register_node("rackstone:rackstone_with_meat", {
  787. description = "Rackstone With Unidentified Meat",
  788. tiles = {"rackstone_rackstone.png^rackstone_meat.png"},
  789. groups = utility.dig_groups("netherack", {rackstone=1, netherack=1}),
  790. sounds = default.node_sound_stone_defaults(),
  791. drop = "mobs:meat_raw 4",
  792. silverpick_drop = true,
  793. movement_speed_multiplier = default.SLOW_SPEED_NETHER,
  794. place_param2 = 10,
  795. })