init.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. local settings = Settings(minetest.get_modpath("quartz").."/settings.txt")
  2. --
  3. -- Item Registration
  4. --
  5. -- Quartz Crystal
  6. minetest.register_craftitem("quartz:quartz_crystal", {
  7. description = "Quartz Crystal",
  8. inventory_image = "quartz_crystal_full.png",
  9. })
  10. minetest.register_craftitem("quartz:quartz_crystal_piece", {
  11. description = "Quartz Crystal Piece",
  12. inventory_image = "quartz_crystal_piece.png",
  13. })
  14. --
  15. -- Node Registration
  16. --
  17. -- Ore
  18. minetest.register_node("quartz:quartz_ore", {
  19. description = "Quartz Ore",
  20. tiles = {"default_stone.png^quartz_ore.png"},
  21. groups = utility.dig_groups("mineral"),
  22. drop = 'quartz:quartz_crystal',
  23. sounds = default.node_sound_stone_defaults(),
  24. silverpick_drop = true,
  25. })
  26. oregen.register_ore({
  27. ore_type = "scatter",
  28. ore = "quartz:quartz_ore",
  29. wherein = "default:stone",
  30. clust_scarcity = 10*10*10,
  31. clust_num_ores = 6,
  32. clust_size = 5,
  33. y_min = -31000,
  34. y_max = -5,
  35. })
  36. -- Quartz Block
  37. minetest.register_node("quartz:block", {
  38. description = "Quartz Block",
  39. tiles = {"quartz_block.png"},
  40. groups = utility.dig_groups("block"),
  41. sounds = default.node_sound_glass_defaults(),
  42. })
  43. -- Chiseled Quartz
  44. minetest.register_node("quartz:chiseled", {
  45. description = "Chiseled Quartz",
  46. tiles = {"quartz_chiseled.png"},
  47. groups = utility.dig_groups("brick"),
  48. sounds = default.node_sound_glass_defaults(),
  49. })
  50. -- Quartz Pillar
  51. minetest.register_node("quartz:pillar", {
  52. description = "Quartz Pillar",
  53. paramtype2 = "facedir",
  54. tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
  55. groups = utility.dig_groups("brick"),
  56. sounds = default.node_sound_glass_defaults(),
  57. on_place = minetest.rotate_node
  58. })
  59. --
  60. -- Crafting
  61. --
  62. -- Quartz Crystal Piece
  63. minetest.register_craft({
  64. output = '"quartz:quartz_crystal_piece" 3',
  65. recipe = {
  66. {'quartz:quartz_crystal'}
  67. }
  68. })
  69. -- Quartz Block
  70. minetest.register_craft({
  71. output = '"quartz:block" 4',
  72. recipe = {
  73. {'quartz:quartz_crystal', 'quartz:quartz_crystal'},
  74. {'quartz:quartz_crystal', 'quartz:quartz_crystal'},
  75. }
  76. })
  77. -- Chiseled Quartz
  78. minetest.register_craft({
  79. output = 'quartz:chiseled 4',
  80. recipe = {
  81. {'quartz:block', 'quartz:block'},
  82. {'quartz:block', 'quartz:block'},
  83. }
  84. })
  85. -- Quartz Pillar
  86. minetest.register_craft({
  87. output = 'quartz:pillar 3',
  88. recipe = {
  89. {'quartz:block'},
  90. {'quartz:block'},
  91. {'quartz:block'},
  92. }
  93. })