(I do not see anything like this in the issues with CC:T... i did not check CC as i did not think it relevant... i hope.)
There are two things i am looking for.
1, turtle.craft()'s output, on successful craft, to return like this:
--If crafting sticks...
turtle.craft() --> true, minecraft:stick
--Plausibly, also include the amount times it crafted:
turtle.craft() --> true, minecraft:stick, 1
We can just check the item amount for how many items we got,
But some recipes make multiple items at once, like sticks.
This is more useful in heavily modded situations (ie ATM10),
when hardcoding how many items a craft will make is not viable
(Atleast, when having a turtle craft arbitrary items.)
2, A function to check if the given recipe is valid, without crafting it.
Or perhaps an addition to turtle.craft()
turtle.recipe() --> minecraft:sticks, 1
turtle.recipe() --> "No matching recipes", 0
--Second output is how many times we can craft it
--Nice, but not needed.
turtle.recipe("minecraft:sticks") --> {{recipe1}, {recipe2}, {ect}}
turtle.recipe("minecraft:sticks") --> {{recipe}}
--Request valid recipe(s) for a given item
--OR
turtle.craft(0) --> false, minecraft:sticks, 0
First choice, simply add turtle.recipe() (or a different name, maybe)
This is probably best option due to not changing old implementation of .craft(),
but finding a decent name may be difficult. .recipe() is probably as good as it gets.
Though, the second choice is using turtle.craft(0)
Simply returning the recipe if the argument is 0 (or less? or more than 64?), instead of outright throwing an err.
This may cause issues when throwing an error is needed
... I dont know why you would need it, but im sure there's likely a reason somewhere for it.
The reason for this is;
I wanted to make a turtle program.
It will tell you what the recipe you are crafting, and be easier to use for crafting than turtle.lua (probably GUI button or pressing enter)e
This is primarily for any situation that the user would find it easier to make a turtle than a crafting table that has storage;
Any table that does not lose its items when leaving it.
Or, any situation where such a thing does not exist (ie, CC only, but i dont expect this to be very common.)
However, I'd imagine this has far more interesting uses with making some form of autocrafter via turtles. Possibly even with having your autocrafting army craft something while you are somewhere else, and sending it to you through an ender chest...
It likely wouldn't be efficient, be it speed or lag, but it sure would be fun.
(It may be useful to be able to give turtle.recipe() an item ID to check what ingredients an item requires to be crafted,
however this seems very difficult due to many items having multiple recipes; atleast when modded.)
(I do not see anything like this in the issues with CC:T... i did not check CC as i did not think it relevant... i hope.)
There are two things i am looking for.
1, turtle.craft()'s output, on successful craft, to return like this:
We can just check the item amount for how many items we got,
But some recipes make multiple items at once, like sticks.
This is more useful in heavily modded situations (ie ATM10),
when hardcoding how many items a craft will make is not viable
(Atleast, when having a turtle craft arbitrary items.)
2, A function to check if the given recipe is valid, without crafting it.
Or perhaps an addition to turtle.craft()
First choice, simply add turtle.recipe() (or a different name, maybe)
This is probably best option due to not changing old implementation of .craft(),
but finding a decent name may be difficult. .recipe() is probably as good as it gets.
Though, the second choice is using turtle.craft(0)
Simply returning the recipe if the argument is 0 (or less? or more than 64?), instead of outright throwing an err.
This may cause issues when throwing an error is needed
... I dont know why you would need it, but im sure there's likely a reason somewhere for it.
The reason for this is;
I wanted to make a turtle program.
It will tell you what the recipe you are crafting, and be easier to use for crafting than turtle.lua (probably GUI button or pressing enter)e
This is primarily for any situation that the user would find it easier to make a turtle than a crafting table that has storage;
Any table that does not lose its items when leaving it.
Or, any situation where such a thing does not exist (ie, CC only, but i dont expect this to be very common.)
However, I'd imagine this has far more interesting uses with making some form of autocrafter via turtles. Possibly even with having your autocrafting army craft something while you are somewhere else, and sending it to you through an ender chest...
It likely wouldn't be efficient, be it speed or lag, but it sure would be fun.
(It may be useful to be able to give turtle.recipe() an item ID to check what ingredients an item requires to be crafted,
however this seems very difficult due to many items having multiple recipes; atleast when modded.)