Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

buildRepeat with replacing blocks does not update positions of blocks to replace

ZacSharp opened this issue ยท 2 comments

commented

Some information

Operating system: Linux,Ubuntu / Linux,Ubuntu
Java version: 1.8 / 1.8
Minecraft version: 1.12.2 / 1.15.2
Baritone version: v1.2.14 / v1.5.2
Forge mods (if used): None / my own, private one to add a branchmineSchematic

Exception, error or logs

There are no exceptions, errors or any log except for the chat messages:

  • "Filling now"
  • "Repeating in build vector Vec3i{x=1, y=0, z=0}, new origin is BlockPos{x=*, y=*, z=*}"
  • "Done building"

How to reproduce

  1. place a log and a dirt in this pattern, with up being positive x and right being positive z
    log dirt
    dirt log
    log dirt
    dirt log
  2. select the dirt and log at the negative x side
  3. run #buildRepeat 1,0,0
  4. get some stone and run #sel replace dirt stone
  5. see it replace first the dirt and all blocks following in the positive x direction, regardless of their type

Modified settings

  • buildRepeat 1,0,0

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not used any OwO's or UwU's in this issue, except for the two in this line.
commented

I believe this comes from the cache in ReplaceSchematic, that needs to be cleared when moving the schematic
This could probably be fixed by adding a reset() method to non-static schematics, that would be called when moving the schematic to clear possible caches

commented

Resetting the cache works, but now #1928 is much more likely to occur, because even if there was something to do there might be nothing to change for the next 1000 blocks.
Without the cache-reset it was sufficient that there was something to do in the first spot.
Fixing this bug causes more trouble than it avoids, as long as #1928 is not fixed.