cabaletta / baritone

google maps for block game
GNU Lesser General Public License v3.0
7.31k stars 1.46k forks source link

#Store Function #605

Open DomNidy opened 5 years ago

DomNidy commented 5 years ago

Im sure someone has already recommended this but I think a storage function would be excellent for baritone. Whenever your inventory gets full from mining or farming the bot would automatically store all added items to nearby chests/marked chests.

The store function would work similar to the mine function and would have a configurable list of items to store. ( store cobblestone diamond_ore iron_ore coal) As for configuring where to store the function could work with the #goto function and goto the nearest chest, and there could also be another function to mark specific chests to store items in. #markchest (name of storage) (items to store here)

This would help baritone out by increasing automation time for mining & farming due to limitless storage.

ZeroMemes commented 5 years ago

@leijurv this could be done by having a higher priority process that takes control if you have the setting on and the inventory is full then activate and path accordingly?

xaengceilbiths commented 5 years ago

I'd use rightclick() in GetToBlockProcess to open a chest and Minecraft.getMinecraft().displayGuiScreen(null) to close a chest, am I right? How many ticks should baritone REQUEST_PAUSE between open and moveitem and close?

matthewfcarlson commented 4 years ago

@dominikaaaa and @ZeroMemes is this something that baritone wants as a feature? I'm working on this for my personal usage and I'd be happy to polish it up to where I'd be comfortable pushing it back up.

5HT2 commented 4 years ago

I think so, this has been heavily requested and has a few duplicates. Go for it if you'd like, I'll review it

matthewfcarlson commented 4 years ago

I'll put in some work on it in the evenings :) Let you know if I've got anything good. Here's the roadmap

5HT2 commented 4 years ago

That looks good so far, maybe have the second off by default and the rest could maybe be on by default

matthewfcarlson commented 4 years ago

Feel free to assign this one to me

matthewfcarlson commented 4 years ago

Yeah- those are good defaults

matthewfcarlson commented 4 years ago

Update: So I had been hoping I could just write the NBT data but it looks like the server doesn't like it and just overwrites it. So right now, it finds a spot to place it, places it, opens it, tries to place things inside (inventory management gets a little wonky when it's full), mines it, then picks up the shulker box. I might break out the retrieving functionality into a separate PR/issue.

matthewfcarlson commented 4 years ago

Is there functionality already for this in impact? I don't want to be duplicating work

5HT2 commented 4 years ago

I don't believe so, and impact is closed source anyways. People still use baritone standalone or in their own mods without impact.

michaelzangl commented 4 years ago

For minebot, I made good experience with storing into normal chests with signs / item frames attached. The algorithm is simple:

Repeat if the inventory contains more items (chests may be full and client only knows after opening it)

The advantage I saw in putting item frames / signs on the chests is that the items will be sorted and that it is pretty easy to configure.

The same strategy can be used for getting items, skipping empty chests.

5HT2 commented 4 years ago

I saw your 1.15.2 branch the other day and I can't believe you're working on Minebot again lol @michaelzangl

michaelzangl commented 4 years ago

@dominikaaaa I won't reactivate all functionality. Minebot is my personal playground project. I currently plan on using it as testing ground for kotlin script integration, to replace the deprecated and old javascript engine that Java comes with.

beartravels commented 4 years ago

I just wanted to leave a comment to how cool this would be in baritone, i build large schematics and want to schematic my red stone bases for easy reproduction but resupplying the bot with only the blocks in my inventory is a pain in the backside. so good luck and i hope all is going well. I also wanted to leave a suggestion so when baritone is looking for a chest of stone you can set the position of that chest mabey? also add a feature that if baritone does not have food look in chest xyz? lol just some input from a USER not a programmer

Teals53 commented 4 years ago

any news about this ?

5HT2 commented 4 years ago

The issue is still open

Teals53 commented 4 years ago

so nothing

5HT2 commented 4 years ago

So this issue is still open...

5HT2 commented 4 years ago

1706 exists if you want to try it, but it's not merged

Teals53 commented 4 years ago

i dont have any software for compile this version also im on mobile internet atm can u help me ? @l1ving also thx for fast reply

OmegaKing commented 4 years ago

Has there been any progress for this? If so when do you think it will be pushed out?

5HT2 commented 4 years ago

If so when do you think it will be pushed out?

image

:joy_cat:

filiphak1 commented 4 years ago

You guys are working on function that stores items in chests/shulkers right? It would be really great cuz I want to leave my character to mine resources whole night and in the meantime store those mined items in chests :D

matthewfcarlson commented 4 years ago

I think that's the plan. It's a huge lift. I've been giving it some thought and I think here's all the things that needs to happen if this is going to get pulled off. Feel free to correct or add to this list

I might dive back into this during the Thanksgiving holiday here in the US, but this is a huge amount of work.

5HT2 commented 4 years ago

It's definitely a lot of work. Take your time.

add shulkers? (it was way harder than I'd like and got ugly)

This (https://github.com/kami-blue/client/blob/e80c719539a3005093c83ce1d6c120b5948ab4d3/src/main/java/me/zeroeightsix/kami/module/modules/misc/AutoObsidian.kt#L90) is using a Baritone process to manage everything, but runs on it's own and is compatible with Baritone's existing processes via pauses

jacklollz2 commented 3 years ago

Your chests/shulkers could be defined using the sel command to create a region of depositable chests/shulkers.

pencildoor commented 3 years ago

I have an idea: if putting things in chests is so difficult, why not just drop the items into a storage system we build? We just walk over to our storage system or use a command like /home for various multiplayer servers and drop the items onto the ground where a hopper can pick them up and put them into our storage system. It's simple to implement and I, for one, would be very satisfied if baritone had only this functionality.

Using my limited knowledge of Java I will attempt a fork of baritone where I will try to muddle my way through this.

joevento commented 3 years ago

What is the current status of this feature? This would be such a cool feature. Really looking forward to using it once its done, if it isn't done already.

TotalTaxAmount commented 3 years ago

Something like this would be nice for autobuild incase you did not have room in your inventory for all the required items.

DereC4 commented 3 years ago

Would be nice

Moon-2006 commented 1 year ago

Four years old lol. Anyone have any updates on this?

beartravels commented 1 year ago

would be nice

matthewfcarlson commented 1 year ago

I had a little prototype that worked sometimes but found moving things in and out of inventories to be unreliable. It would try to drop off a load of coal and then start walking away, only to walk back because the inventory was still full. I think the idea of just dropping things on the ground is a great one, but my goal with this was to build impossibly large structures in survival mode. It's pretty low on my priorities, but I would like to get back to someday.

Gamekind135 commented 1 year ago

i startet with baritone like a month ago, and ive seen videos from like 2bt2 where they automaticly get an shulker and get echests and then mine them for obbi, so i see this is already an i guess old ticket and are here already stuff like auto obsidian or auto fill in shulker while mining or farming or thad? Ive Loved to know this

rycbar0 commented 1 year ago

while this people you have seen probably uses a client that contains baritone, base baritone as you get it from us does not have this features. they are added by the developer of the client by creating macros or custom baritone versions. to see what base baritone can do i suggest to read the command list in usage or consult the ingame help with #help which also provides you with a list of all commands, what they do and how to use them.

Gamekind135 commented 1 year ago

i know these commands but how can i mod the baritone so it "Farm Obsidian" trough echest store items away afer minig and the only thing i want is this with fabric 1.19.2

rycbar0 commented 1 year ago

you get the source code from here, modify it, compile it and put the compiled jar file in your mods folder.

Moon-2006 commented 1 year ago

I know its possible to do, Lejurv almost certainly used a modified version of baritone to manage Gringotts, and the bots on 2b2t that automatically deliver resources might use something similar as well, but its none of it is public. Maybe someone will release code for it eventually.

thaqalayn commented 9 months ago

@leijurv can we make this happen if this hits 5 likes 🥺

Nickyharbr commented 9 months ago

anyone got this working

WolfSurwail commented 5 months ago

Есть ли уже функциональность для этого? Я не хочу дублировать работу

after 4 years you were able to do this?

TropicLegend commented 4 months ago

Has anybody got this to work? Sounds like an absolutely awesome feature to implement tbh.

REALERvolker1 commented 1 month ago

I don't blame them for deciding not to implement this feature. It is very complex. You have to have the bot detect shulkers in your inventory, set a goal to place those down, automatically open the shulkers, deposit the items, then set another goal to mine the shulkers, then continue mining. Any slight variations or constraints in this process could easily and completely break it.