From 1f800ff58330c4dde9c1e5b43cfed2f9c5fbe0a9 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 8 Jul 2017 09:08:23 +0100 Subject: code tweaks and new settings --- crafts.lua | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'crafts.lua') 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", { -- cgit v1.2.3