init.lua 589 B

123456789101112131415161718192021222324
  1. local modpath = minetest.get_modpath("sticks_and_torches")
  2. dofile(modpath .. "/torch.lua")
  3. local S = minetest.get_translator("sticks_and_torches")
  4. minetest.register_craftitem("sticks_and_torches:stick",
  5. {
  6. description = S("Stick"),
  7. groups = {stick = 1},
  8. inventory_image = "sticks_and_torches_stick.png",
  9. stack_max = 128,
  10. })
  11. minetest.register_alias("stick", "sticks_and_torches:stick")
  12. minetest.register_craft(
  13. {
  14. type = "cooking",
  15. output = minetest.registered_aliases["torch"],
  16. recipe = minetest.registered_aliases["stick"],
  17. cooktime = "2",
  18. })
  19. give_initial_stuff.add("torch 32")