crafts.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. local S = mobs.intllib
  2. -- name tag
  3. minetest.register_craftitem("mobs:nametag", {
  4. description = S("Name Tag"),
  5. inventory_image = "mobs_nametag.png",
  6. })
  7. if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
  8. minetest.register_craft({
  9. type = "shapeless",
  10. output = "mobs:nametag",
  11. recipe = {"default:paper", "dye:black", "farming:string"},
  12. })
  13. end
  14. -- leather
  15. minetest.register_craftitem("mobs:leather", {
  16. description = S("Leather"),
  17. inventory_image = "mobs_leather.png",
  18. })
  19. -- raw meat
  20. minetest.register_craftitem("mobs:meat_raw", {
  21. description = S("Raw Meat"),
  22. inventory_image = "mobs_meat_raw.png",
  23. on_use = minetest.item_eat(3),
  24. })
  25. -- cooked meat
  26. minetest.register_craftitem("mobs:meat", {
  27. description = S("Meat"),
  28. inventory_image = "mobs_meat.png",
  29. on_use = minetest.item_eat(8),
  30. })
  31. minetest.register_craft({
  32. type = "cooking",
  33. output = "mobs:meat",
  34. recipe = "mobs:meat_raw",
  35. cooktime = 5,
  36. })
  37. -- lasso
  38. minetest.register_tool("mobs:lasso", {
  39. description = S("Lasso (right-click animal to put in inventory)"),
  40. inventory_image = "mobs_magic_lasso.png",
  41. })
  42. if minetest.get_modpath("farming") then
  43. minetest.register_craft({
  44. output = "mobs:lasso",
  45. recipe = {
  46. {"farming:string", "", "farming:string"},
  47. {"", "default:diamond", ""},
  48. {"farming:string", "", "farming:string"},
  49. }
  50. })
  51. end
  52. minetest.register_alias("mobs:magic_lasso", "mobs:lasso")
  53. -- net
  54. minetest.register_tool("mobs:net", {
  55. description = S("Net (right-click animal to put in inventory)"),
  56. inventory_image = "mobs_net.png",
  57. })
  58. if minetest.get_modpath("farming") then
  59. minetest.register_craft({
  60. output = "mobs:net",
  61. recipe = {
  62. {"group:stick", "", "group:stick"},
  63. {"group:stick", "", "group:stick"},
  64. {"farming:string", "group:stick", "farming:string"},
  65. }
  66. })
  67. end
  68. -- shears (right click to shear animal)
  69. minetest.register_tool("mobs:shears", {
  70. description = S("Steel Shears (right-click to shear)"),
  71. inventory_image = "mobs_shears.png",
  72. })
  73. minetest.register_craft({
  74. output = 'mobs:shears',
  75. recipe = {
  76. {'', 'default:steel_ingot', ''},
  77. {'', 'group:stick', 'default:steel_ingot'},
  78. }
  79. })
  80. -- protection rune
  81. minetest.register_craftitem("mobs:protector", {
  82. description = S("Mob Protection Rune"),
  83. inventory_image = "mobs_protector.png",
  84. })
  85. minetest.register_craft({
  86. output = "mobs:protector",
  87. recipe = {
  88. {"default:stone", "default:stone", "default:stone"},
  89. {"default:stone", "default:goldblock", "default:stone"},
  90. {"default:stone", "default:stone", "default:stone"},
  91. }
  92. })
  93. -- saddle
  94. minetest.register_craftitem("mobs:saddle", {
  95. description = S("Saddle"),
  96. inventory_image = "mobs_saddle.png"
  97. })
  98. minetest.register_craft({
  99. output = "mobs:saddle",
  100. recipe = {
  101. {"mobs:leather", "mobs:leather", "mobs:leather"},
  102. {"mobs:leather", "default:steel_ingot", "mobs:leather"},
  103. {"mobs:leather", "default:steel_ingot", "mobs:leather"},
  104. }
  105. })