baritone icon indicating copy to clipboard operation
baritone copied to clipboard

Use a list of placements instead of one. (faster builder)

Open Redhawk18 opened this issue 1 year ago • 3 comments

This allows us to have multiple placement locations at once to speed up building.

Redhawk18 avatar Aug 14 '24 20:08 Redhawk18

Interesting. Does this work on 2b2t?

leijurv avatar Aug 22 '24 18:08 leijurv

Interesting. Does this work on 2b2t?

It should, but not tested.

Redhawk18 avatar Aug 22 '24 21:08 Redhawk18

@leijurv @ZacSharp thoughts?

Redhawk18 avatar Sep 28 '24 02:09 Redhawk18

erm, what the sigma

Redhawk18 avatar Oct 20 '24 18:10 Redhawk18

Is there something I need to do for this to have an effect? I just tried testing this and can't tell whether I was placeboing myself or it's actually faster.

ZacSharp avatar Oct 20 '24 19:10 ZacSharp

Is there something I need to do for this to have an effect? I just tried testing this and can't tell whether I was placeboing myself or it's actually faster.

The best example I can find is placements that were already fast are just faster.

Redhawk18 avatar Oct 20 '24 20:10 Redhawk18

For example, if I let Baritone place a ring of blocks, all placeable from the initial position, does this pr make it faster?

I'm wondering because InputOverrideHandler clicks once per tick so it should only actually click on the last block for which the builder set the rotations.

ZacSharp avatar Oct 20 '24 20:10 ZacSharp

For example, if I let Baritone place a ring of blocks, all placeable from the initial position, does this pr make it faster?

I'm wondering because InputOverrideHandler clicks once per tick so it should only actually click on the last block for which the builder set the rotations.

It's been over two months since I made those changes but I believe it does. Because it's running the right click function more often because it returns a list of blocks to place.

Redhawk18 avatar Oct 20 '24 21:10 Redhawk18

It's been over two months since I made those changes

Yeah, sorry for being a slow-ass reviewer. I had some higher priority things to spend my time on, so couldn't test this properly.

it's running the right click function more often

That's specifically the part I'm concerned about. The function it calls only sets a flag which says "RMB is pressed" and the packet will actually be sent later when InputOverrideHandler ticks (and is not on cooldown).

ZacSharp avatar Oct 21 '24 20:10 ZacSharp

It's been over two months since I made those changes

Yeah, sorry for being a slow-ass reviewer. I had some higher priority things to spend my time on, so couldn't test this properly.

it's running the right click function more often

That's specifically the part I'm concerned about. The function it calls only sets a flag which says "RMB is pressed" and the packet will actually be sent later when InputOverrideHandler ticks (and is not on cooldown).

You're the fastest maintainer I wouldn't worry about speed, its not like you record videos of you clipping your toe nails like leijurv either. But I don't think I have a way to test this, but I remember it was visibly faster. However its been so long I don't remember. Likely @mankool0 could explain why, he's the one that gave me the tip that this could be slow.

Redhawk18 avatar Oct 21 '24 23:10 Redhawk18

What exactly is the problem with toe nail clipping videos??? 😂

leijurv avatar Oct 21 '24 23:10 leijurv

What exactly is the problem with toe nail clipping videos??? 😂

Oh so now you respond, :smiling_imp:

Redhawk18 avatar Oct 21 '24 23:10 Redhawk18

@mankool0, do you have anything to say on this?

ZacSharp avatar Oct 29 '24 18:10 ZacSharp

@mankool0, do you have anything to say on this?

I'm not sure if this would work on 2b2t. I just know from testing on constantiam that in some cases you can place 2 blocks in a single tick if the rotation between them is minimal. I also haven't tested it with different blocks, but I imagine you'd have problems trying to place 2 different blocks at once. Since baritone is mostly 2b2t related I feel like this pr still needs changes to make sure the blocks it's trying to multi place are the same, otherwise it'll be placing the wrong blocks and will constantly be breaking and replacing.

It should also be tested on 2b2t to see what the limit on rotations is and if this works there at all. Maybe also create some sort of schematic to speed test different settings to have a good default value.

I'm not currently able to test this pr so I'm not sure if other changes are needed.

mankool0 avatar Oct 31 '24 06:10 mankool0

Is there anyone willing to test on 2b?

Redhawk18 avatar Oct 31 '24 17:10 Redhawk18