diff --git a/README.md b/README.md index a78839e..e85ab47 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ function throwing.register_bow(name, definition) --[[ Name: Bow name. If it doesn't contain ":", the "throwing:" prefix will be added. Definition: definition table, containing: - * itemcraft (optional, you may want to register your own craft or to make the bow uncraftable): item used to craft the bow. * description (highly recommended): description of the bow. * texture (essential): texture of the bow, shown in inventory. * groups (optional): groups of the item. @@ -64,8 +63,6 @@ function throwing.register_arrow(name, definition table) --[[ Name: Arrow name. If it doesn't contain ":", the "throwing:" prefix will be added. Definition: definition table, containing: - * itemcraft (optional, you may want to register your own craft or to make the arrow uncraftable): item used to craft the arrow. - * craft_quantity (optional, defaulting to 1 if itemcraft is non-nil, pointless otherwise): quantity of arrows in the craft output. * tiles (essential): tiles of the arrow. * target (optional, defaulting to throwing.target_both): what the arrow is able to hit (throwing.target_node, throwing.target_object, throwing.target_both). * allow_protected (optional, defaulting to false): whether the arrow can be throw in a protected area diff --git a/init.lua b/init.lua index 2c3559d..7a27fb9 100644 --- a/init.lua +++ b/init.lua @@ -291,21 +291,6 @@ function throwing.register_arrow(name, def) on_hit_fails = def.on_hit_fails, item = name, }) - - if def.itemcraft then - minetest.register_craft({ - output = name.." "..tostring(def.craft_quantity or 1), - recipe = { - {def.itemcraft, "default:stick", "default:stick"} - } - }) - minetest.register_craft({ - output = name.." "..tostring(def.craft_quantity or 1), - recipe = { - { "default:stick", "default:stick", def.itemcraft} - } - }) - end end @@ -378,21 +363,4 @@ function throwing.register_bow(name, def) return itemstack end minetest.register_tool(name, def) - - if def.itemcraft then - -- Check for an override name - -- because an ``output = ":name"'' can't exist in a recipe - local output_name = name - if name:sub(1,1) == ":" then - output_name = name:sub(2) - end - minetest.register_craft({ - output = output_name, - recipe = { - {"farming:cotton", def.itemcraft, ""}, - {"farming:cotton", "", def.itemcraft}, - {"farming:cotton", def.itemcraft, ""}, - } - }) - end end diff --git a/mod.conf b/mod.conf index 8ca5657..c86c78c 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,3 @@ name = throwing -optional_depends = wielded_light, farming +optional_depends = wielded_light description = Throwing library: provides an API for registering throwing and throwable things