init.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. local S = technic.getter
  2. -- Sapphire
  3. --- Sapphire Gem
  4. minetest.register_craftitem(":technic_aluminum:sapphire", {
  5. description = S("Sapphire"),
  6. inventory_image = "aluminum_sapphire.png",
  7. })
  8. --- Sapphire Block
  9. minetest.register_node(":technic_aluminum:sapphire_block", {
  10. description = S("Sapphire Block"),
  11. tiles = {"aluminum_sapphire_block.png"},
  12. is_ground_content = false,
  13. groups = {cracky = 1, level = 3},
  14. sounds = default.node_sound_stone_defaults(),
  15. })
  16. ---- Crafting Recipe: 9x Sapphire <=> Sapphire Block
  17. minetest.register_craft({
  18. output = 'technic_aluminum:sapphire_block',
  19. recipe = {
  20. {'technic_aluminum:sapphire', 'technic_aluminum:sapphire', 'technic_aluminum:sapphire'},
  21. {'technic_aluminum:sapphire', 'technic_aluminum:sapphire', 'technic_aluminum:sapphire'},
  22. {'technic_aluminum:sapphire', 'technic_aluminum:sapphire', 'technic_aluminum:sapphire'},
  23. }
  24. })
  25. minetest.register_craft({
  26. output = 'technic_aluminum:sapphire 9',
  27. recipe = {
  28. {'technic_aluminum:sapphire_block'},
  29. }
  30. })
  31. --- Sapphire Ore
  32. minetest.register_node(":technic_aluminum:stone_with_sapphires", {
  33. description = S("Sapphire Ore"),
  34. tiles = {"default_stone.png^aluminum_mineral_sapphire.png"},
  35. groups = {cracky = 1},
  36. drop = 'technic_aluminum:sapphire',
  37. sounds = default.node_sound_stone_defaults(),
  38. })
  39. if technic then
  40. --- Sapphire Dust
  41. minetest.register_craftitem(":technic_aluminum:sapphire_dust", {
  42. description = S("Blue Corundum Dust"),
  43. inventory_image = "aluminum_sapphire_dust.png",
  44. })
  45. local iron_in = 2
  46. local iron_out = 1
  47. local alumina_in = 3
  48. local alumina_out = 3
  49. local dust_in = 5
  50. local dust_out = 5
  51. technic.register_alloy_recipe({input = {"technic_aluminum:alumina_dust "..alumina_in, "technic:iron_dust "..iron_in}, output = "technic_aluminum:sapphire_dust", time = 12})
  52. technic.register_separating_recipe({input = {"technic_aluminum:sapphire_dust"}, output = {"technic_aluminum:alumina_dust "..alumina_out, "technic:iron_dust "..iron_out}, time = 12})
  53. technic.register_grinder_recipe({input = {"technic_aluminum:sapphire"}, output = "technic_aluminum:sapphire_dust "..dust_out, time = 12})
  54. technic.register_compressor_recipe({input = {"technic_aluminum:sapphire_dust "..dust_in}, output = "technic_aluminum:sapphire", time = 12})
  55. minetest.register_craft({
  56. output = 'technic:blue_energy_crystal',
  57. recipe = {
  58. {'technic_aluminum:sapphire_block', 'technic:battery', 'dye:blue'},
  59. {'technic:battery', 'technic:green_energy_crystal', 'technic:battery'},
  60. {'dye:blue', 'technic:battery', 'technic_aluminum:sapphire_block'},
  61. }
  62. })
  63. minetest.register_craft({
  64. output = 'technic:water_mill',
  65. recipe = {
  66. {'technic:marble', 'technic_aluminum:sapphire', 'technic:marble'},
  67. {'group:wood', 'technic:machine_casing', 'group:wood'},
  68. {'technic:marble', 'technic:lv_cable0', 'technic:marble'},
  69. }
  70. })
  71. end
  72. minetest.register_ore({
  73. ore_type = "scatter",
  74. ore = "technic_aluminum:stone_with_sapphires",
  75. wherein = "default:stone",
  76. clust_scarcity = 17 * 17 * 17,
  77. clust_num_ores = 4,
  78. clust_size = 3,
  79. y_min = -255,
  80. y_max = -128,
  81. })
  82. minetest.register_ore({
  83. ore_type = "scatter",
  84. ore = "technic_aluminum:stone_with_sapphires",
  85. wherein = "default:stone",
  86. clust_scarcity = 16 * 16 * 16,
  87. clust_num_ores = 4,
  88. clust_size = 3,
  89. y_min = -31000,
  90. y_max = -256,
  91. })