init.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. local S = minetest.get_translator("kilns")
  2. crafting.register_recipe(
  3. {
  4. output = "kiln",
  5. type = "inv",
  6. items = {"cobble 4"},
  7. always_known = true,
  8. })
  9. --node registration
  10. ------------------------------------------------------------------------
  11. local on_timer, on_punch, on_rightclick, on_construct =
  12. dofile(minetest.get_modpath("kilns") .. "/kiln_node_callbacks.lua")
  13. minetest.register_node("kilns:kiln_off",
  14. {
  15. description = S("Kiln"),
  16. paramtype2 = "facedir",
  17. is_ground_content = false,
  18. drawtype = "mesh",
  19. mesh = "kilns_kiln.obj",
  20. tiles = {"kilns_kiln_off.png"},
  21. groups = {cracky = 2,},
  22. sounds = generic_media.node_sound_stone_defaults(),
  23. sunlight_propagates = true,
  24. collision_box =
  25. {
  26. type = "fixed",
  27. fixed = {
  28. {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
  29. },
  30. },
  31. on_rightclick = on_rightclick,
  32. on_punch = on_punch,
  33. on_construct = on_construct,
  34. on_timer = on_timer,
  35. stack_max = 2,
  36. })
  37. minetest.register_node("kilns:kiln_on",
  38. {
  39. description = S("Kiln"),
  40. paramtype2 = "facedir",
  41. is_ground_content = false,
  42. drawtype = "mesh",
  43. mesh = "kilns_kiln.obj",
  44. tiles = {"kilns_kiln_on.png"},
  45. groups = {cracky = 2, not_in_creative_inventory = 1,},
  46. sounds = generic_media.node_sound_stone_defaults(),
  47. sunlight_propagates = true,
  48. light_source = 14,
  49. collision_box = {
  50. type = "fixed",
  51. fixed = {
  52. {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
  53. {-0.25, 0, -0.25, 0.25, 0.5, 0.25},
  54. },
  55. },
  56. drop = "kiln",
  57. on_rightclick = on_rightclick,
  58. on_punch = on_punch,
  59. on_construct = on_construct,
  60. on_timer = on_timer,
  61. })
  62. minetest.register_alias("kiln", "kilns:kiln_off")