mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Added method to get all registered recipes for item(node)
This commit is contained in:
parent
ba78194636
commit
5af8acfa6e
4 changed files with 120 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue