Implement new crafting algorithm (#132)

* Implement new crafting algorithm

* Take craft width into account when creating craft index
* Fix moving logic, correctly check for empty stacks
* Return early when there's not enough items for craft
* Bound match_count with smallest stack_max value, take from inventory only if needed
* Continue if item can't be moved to the current position.
* Fix metadata loss and. Improve placement for some corner cases.
* Drop items from oversized stacks on the ground
* Place items exactly as displayed in the guide
* One source list one destination. Try to take from destination list first
This commit is contained in:
Andrey Kozlovskiy
2019-10-26 18:22:33 +03:00
committed by SmallJoker
parent 4a1414bacc
commit ca6d9a10df
4 changed files with 413 additions and 97 deletions

View File

@ -305,4 +305,3 @@ function unified_inventory.is_creative(playername)
return minetest.check_player_privs(playername, {creative=true})
or minetest.settings:get_bool("creative_mode")
end