Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

"#Selection Replace Air Dirt" Question

IsaacDawg97 opened this issue ยท 6 comments

commented

Bug Information

Using #Sel Replace Air Dirt, Any placed Dirt that turns into a Grass Block will be replaced with Dirt aswell. Causing a loop if used in a big enough selection.
Adding Grass Block to BuildIgnoreBlocks and/or BuildSkipBlocks had no effect.

Some information

Minecraft version: 1.20.6
Baritone version: 1.10.2-3-g798834a3

commented

Appreciate it. I wasn't aware of buildSubstitutes or buildValidSubstitutes, but they don't seem to be working when trying to change or add to them with ingame commands, nor could I find anything related in any baritone settings files.
I'm not very knowledgeable with Baritone yet, so I apologize.

commented

It should be possible to set them either by either

  • Using the setting as a command and the value as the sole argument, e.g. #buildValidSubstitutes dirt->grass. This is a shorthand for
  • the settings command. e.g. #set buildValidSubstitutes dirt->grass (the command has aliases #set, #setting, #settings)
  • directly editing the corresponding line in the settings file, adding it if it doesn't exist (you shouldn't need to do this)
commented

So are you saying I should be able to exactly type "#buildValidSubstitutes dirt->grass" or grass_block and it should work? Because it doesn't seem to be.
Both "#buildValidSubstitutes" and "#set buildValidSubstitutes" correctly autocorrect, but have nothing further afterwards other than a thin blank box.
image
I've also tried the obvious "#buildValidSubstitutes dirt grass_block" and other similar variations.

For "#buildValidSubstitutes dirt->grass" I get Error at argument # 2: Expected a valid value.

commented

Maybe I got the block id wrong. Try "grass_block" instead of "grass"

commented

Oh wow thanks, I guess I didn't actually try it with grass_block before I wrote my comment. It would be nice to have it autofill the text and work similarly to commands like "#sel replace" that need specific block names even though it doesn't work the exact same way.
Appreciate it and thanks for your time.

commented

That's expected behavior and refusing to replace grass would definitely be a bug.
The setting you want is buildSubstitutes or buildValidSubstitutes.

  • buildIgnoreBlocks grass ignores additional grass blocks, i.e. grass is allowed to be in positions where the schematic contains air. This is effectively the same as buildValidSubstitutes air->grass
  • buildSkipBlocks grass removes grass from the schematic, i.e. anything is allowed to be in positions where the schematic contains grass
  • buildSubstitutes grass->dirt replaces all grass in your schematic with dirt, i.e. only dirt is allowed in positions where the schematic contains grass
  • buildValidSubstitutes grass->dirt ignores dirt in positions where the schematic contains grass