baritone
baritone copied to clipboard
Add Crafting command
I want to be honest, as it is, its unusable. Maybe someone has a idea how to salvage it. My main problem is that items from blocks like oak planks and spruce planks or stone and granite, are the same item and i dont know how to handle them. Also some items have recipes that allow different ingredients (example chests) and i havnt yet figured out how to pick whats available instead of a fixed ingredient. If this problems cant be solved i cant see this ever working. some problems like checking if we have the resources to craft are related to this, others like placing a crafting table when non is available arnt a priority aslong as first one exist.
Whats missing (list not complete):
- place crafting table if non is available
- cancel operation and inform player if low on resources
- proper way to get a item from a string
- proper way to get a recipe from a item
What it can do:
- walk to a crafting table and craft. (only works with some items, example #craft stick 200, #craft stone_axe)
PS: deconstructing recipies is not planed. if you want a wooden_pickaxe but you only have log's it wont automaticly craft planks and sticks.
This is looking really nice! I'll test it out tomorrow.
You're a real coding wizard!
Forgot to include in my review:
The scope looks simple and small. That's good.
Not sure what that autoCraft
setting is supposed to be though. So far you don't seem to plan on automatically starting crafting (I think that's good) and from it's documentation it seems to be a setting to disable #craft
?
Forgot to include in my review: The scope looks simple and small. That's good. Not sure what that
autoCraft
setting is supposed to be though. So far you don't seem to plan on automatically starting crafting (I think that's good) and from it's documentation it seems to be a setting to disable#craft
?
I kinda just threw that in. It was meant to make baritone walk over to a crafting table and then open it, letting the user craft their own thing. It probably will be removed.
Nevermind its been removed
altoclef is gonna be obsolete soon
this is what it can do at the moment. i will need help with coding the "placing crafting tables" part. i thought about adding something similar for furnaces but they are extremely slow and idk how i could split the smelting on multiple furnaces. i dont think brewing, smithing, enchanting or trading are needed. https://youtu.be/W6w_uHJijzw
For placing I know brute force is inefficient (very limited range if you don't want to cause a lagspike) so I'd suggest just doing something like what BuilderProcess
uses to determine placeable positions and if that fails just walk away a bit. This covers fewer positions but is much lighter on performance and I can't really imagine why it would do much worse. In most cases the first scan will find a position and that's it, in most other cases it will be able to place were it was standing or after breaking a block for tunneling.
Two problems with current error handling:
- If an unexpected screen or no screen is open, either fail with a clear error message or wait a couple seconds and then close it and attempt to open the crafting screen again. If the unexpected screen is chat then log a single message instead of closing it and wait until it is closed. That way the user has time to cancel the task and also knows this is intentional. Canceling while Baritone is opening 10+ GUIs per second is basically impossible without alt + f4.
- If it can't click the table despite being next to it, log a message and fail. Don't crash the game for no reason.
How should i resolve the merge conflict? upstream merge with master?
Merging master into your branch again is probably the easiest way, yes.