From 5af8acfa6e41e258dd7e2135e8e75f03096c1d5c Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Mon, 4 Mar 2013 01:55:16 +0100 Subject: Added method to get all registered recipes for item(node) --- doc/lua_api.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/lua_api.txt') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 8246377e2..809d3d9d0 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -922,12 +922,17 @@ minetest.get_craft_result(input) -> output, decremented_input ^ output.time = number, if unsuccessful: 0 ^ decremented_input = like input minetest.get_craft_recipe(output) -> input +^ returns last registered recipe for output item (node) ^ output is a node or item type such as 'default:torch' ^ input.method = 'normal' or 'cooking' or 'fuel' ^ input.width = for example 3 ^ input.items = for example { stack 1, stack 2, stack 3, stack 4, stack 5, stack 6, stack 7, stack 8, stack 9 } ^ input.items = nil if no recipe found +minetest.get_all_craft_recipes(output) -> table or nil +^ returns table with all registered recipes for output item (node) +^ returns nil if no recipe was found +^ table entries have same format as minetest.get_craft_recipe minetest.handle_node_drops(pos, drops, digger) ^ drops: list of itemstrings ^ Handles drops from nodes after digging: Default action is to put them into -- cgit v1.2.3