init.lua 2.4 KB

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