summaryrefslogtreecommitdiff
path: root/crafts.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-08 09:08:23 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-08 09:08:23 +0100
commit1f800ff58330c4dde9c1e5b43cfed2f9c5fbe0a9 (patch)
tree16f0a7bbcf036b939099b4f760ac493e8019e5c3 /crafts.lua
parent27390b2e36ed5427d1546ae3487adcafa660f5d5 (diff)
code tweaks and new settings
Diffstat (limited to 'crafts.lua')
-rw-r--r--crafts.lua48
1 files changed, 27 insertions, 21 deletions
diff --git a/crafts.lua b/crafts.lua
index 7b3a16d..7257388 100644
--- a/crafts.lua
+++ b/crafts.lua
@@ -7,11 +7,13 @@ minetest.register_craftitem("mobs:nametag", {
inventory_image = "mobs_nametag.png",
})
-core.register_craft({
- type = "shapeless",
- output = "mobs:nametag",
- recipe = {"default:paper", "dye:black", "farming:string"},
-})
+if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
+ minetest.register_craft({
+ type = "shapeless",
+ output = "mobs:nametag",
+ recipe = {"default:paper", "dye:black", "farming:string"},
+ })
+end
-- leather
minetest.register_craftitem("mobs:leather", {
@@ -46,14 +48,16 @@ minetest.register_tool("mobs:lasso", {
inventory_image = "mobs_magic_lasso.png",
})
-minetest.register_craft({
- output = "mobs:lasso",
- recipe = {
- {"farming:string", "", "farming:string"},
- {"", "default:diamond", ""},
- {"farming:string", "", "farming:string"},
- }
-})
+if minetest.get_modpath("farming") then
+ minetest.register_craft({
+ output = "mobs:lasso",
+ recipe = {
+ {"farming:string", "", "farming:string"},
+ {"", "default:diamond", ""},
+ {"farming:string", "", "farming:string"},
+ }
+ })
+end
minetest.register_alias("mobs:magic_lasso", "mobs:lasso")
@@ -63,14 +67,16 @@ minetest.register_tool("mobs:net", {
inventory_image = "mobs_net.png",
})
-minetest.register_craft({
- output = "mobs:net",
- recipe = {
- {"default:stick", "", "default:stick"},
- {"default:stick", "", "default:stick"},
- {"farming:string", "default:stick", "farming:string"},
- }
-})
+if minetest.get_modpath("farming") then
+ minetest.register_craft({
+ output = "mobs:net",
+ recipe = {
+ {"group:stick", "", "group:stick"},
+ {"group:stick", "", "group:stick"},
+ {"farming:string", "group:stick", "farming:string"},
+ }
+ })
+end
-- shears (right click to shear animal)
minetest.register_tool("mobs:shears", {