init.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. place_param2 = 10,
  26. })
  27. oregen.register_ore({
  28. ore_type = "scatter",
  29. ore = "quartz:quartz_ore",
  30. wherein = "default:stone",
  31. clust_scarcity = 10*10*10,
  32. clust_num_ores = 6,
  33. clust_size = 5,
  34. y_min = -31000,
  35. y_max = -5,
  36. })
  37. -- Quartz Block
  38. minetest.register_node("quartz:block", {
  39. description = "Quartz Block",
  40. tiles = {"quartz_block.png"},
  41. groups = utility.dig_groups("block"),
  42. sounds = default.node_sound_glass_defaults(),
  43. })
  44. -- Chiseled Quartz
  45. minetest.register_node("quartz:chiseled", {
  46. description = "Chiseled Quartz",
  47. tiles = {"quartz_chiseled.png"},
  48. groups = utility.dig_groups("brick"),
  49. sounds = default.node_sound_glass_defaults(),
  50. })
  51. -- Quartz Pillar
  52. minetest.register_node("quartz:pillar", {
  53. description = "Quartz Pillar",
  54. paramtype2 = "facedir",
  55. tiles = {"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
  56. groups = utility.dig_groups("brick"),
  57. sounds = default.node_sound_glass_defaults(),
  58. on_place = minetest.rotate_node
  59. })
  60. --
  61. -- Crafting
  62. --
  63. -- Quartz Crystal Piece
  64. minetest.register_craft({
  65. output = '"quartz:quartz_crystal_piece" 3',
  66. recipe = {
  67. {'quartz:quartz_crystal'}
  68. }
  69. })
  70. -- Quartz Block
  71. minetest.register_craft({
  72. output = '"quartz:block" 4',
  73. recipe = {
  74. {'quartz:quartz_crystal', 'quartz:quartz_crystal'},
  75. {'quartz:quartz_crystal', 'quartz:quartz_crystal'},
  76. }
  77. })
  78. -- Chiseled Quartz
  79. minetest.register_craft({
  80. output = 'quartz:chiseled 4',
  81. recipe = {
  82. {'quartz:block', 'quartz:block'},
  83. {'quartz:block', 'quartz:block'},
  84. }
  85. })
  86. -- Quartz Pillar
  87. minetest.register_craft({
  88. output = 'quartz:pillar 3',
  89. recipe = {
  90. {'quartz:block'},
  91. {'quartz:block'},
  92. {'quartz:block'},
  93. }
  94. })