Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local stoploop = 0
- for iter = 1, amount do
- local index = 1
- for y = 1, 3 do
- for x = 1, width do
- local needed_item = needed[index]
- if needed_item and stoploop == 0 then
- local craft_index = ((y - 1) * 3) + x
- local craft_item = craft_list[craft_index]
- local newitem = move_item(player_inv, craft_item, needed_item)
- if newitem then
- craft_list[craft_index] = newitem
- else
- stoploop = 1
- break
- end
- end
- index = index + 1
- end
- end
- end
- player_inv:set_list("craft", craft_list)
- unified_inventory.set_inventory_formspec(player, "craft")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement