baritone icon indicating copy to clipboard operation
baritone copied to clipboard

#Store Function

Open DomNidy opened this issue 6 years ago • 43 comments

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.

DomNidy avatar Jul 21 '19 20:07 DomNidy

@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?

ZeroMemes avatar Jul 21 '19 21:07 ZeroMemes

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?

xaengceilbiths avatar Oct 24 '19 04:10 xaengceilbiths

@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.

matthewfcarlson avatar Apr 14 '20 17:04 matthewfcarlson

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

5HT2 avatar Apr 14 '20 17:04 5HT2

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

  • [x] Add new option to set the items you want to store (this would default to what you're mining)
  • [ ] Store items from shulkers in inventory if full
  • [ ] Pull items from shulkers in inventory if needed
  • [ ] Go put items in chests (leverage chests command?)
  • [ ] Pull items from chests if needed

matthewfcarlson avatar Apr 14 '20 18:04 matthewfcarlson

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

5HT2 avatar Apr 14 '20 18:04 5HT2

Feel free to assign this one to me

matthewfcarlson avatar Apr 14 '20 18:04 matthewfcarlson

Yeah- those are good defaults

matthewfcarlson avatar Apr 14 '20 18:04 matthewfcarlson

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 avatar May 05 '20 06:05 matthewfcarlson

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

matthewfcarlson avatar May 05 '20 06:05 matthewfcarlson

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

5HT2 avatar May 05 '20 13:05 5HT2

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

  • Scan chests around the player
  • Find the one with a matching item in a item frame or a sign with the given item name on it
  • Walk near that chest
  • Open it
  • Place as many items in there as possible

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.

michaelzangl avatar May 17 '20 21:05 michaelzangl

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

5HT2 avatar May 18 '20 01:05 5HT2

@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.

michaelzangl avatar May 18 '20 12:05 michaelzangl

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

beartravels avatar Jun 22 '20 08:06 beartravels

any news about this ?

Teals53 avatar Nov 04 '20 16:11 Teals53

The issue is still open

5HT2 avatar Nov 04 '20 16:11 5HT2

so nothing

Teals53 avatar Nov 04 '20 16:11 Teals53

So this issue is still open...

5HT2 avatar Nov 04 '20 16:11 5HT2

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

5HT2 avatar Nov 04 '20 16:11 5HT2

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

Teals53 avatar Nov 04 '20 16:11 Teals53

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

OmegaKing avatar Nov 13 '20 15:11 OmegaKing

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

image

:joy_cat:

5HT2 avatar Nov 13 '20 20:11 5HT2

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

filiphak1 avatar Nov 24 '20 23:11 filiphak1

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

  • Augment the task system support proper interrupting and reordering
  • Fix the mine task to allow it to be interrupted
  • Finish the chest storage location system and add a command to remember chests
  • add navigate to a remembered chest functionality
  • add helpers to manage storage and retrieval
  • add system that detects if inventory is full while mining and kicks off storage process
  • add shulkers? (it was way harder than I'd like and got ugly)

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

matthewfcarlson avatar Nov 25 '20 18:11 matthewfcarlson

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

5HT2 avatar Nov 25 '20 18:11 5HT2

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

jacklollz2 avatar May 15 '21 19:05 jacklollz2

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.

pencildoor avatar May 23 '21 19:05 pencildoor

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.

joevento avatar Jul 31 '21 06:07 joevento

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

TotalTaxAmount avatar Aug 21 '21 16:08 TotalTaxAmount