Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baritone can't mine flowers next to the world boarder #4654

Open
2 of 4 tasks
pennilessSplatter opened this issue Feb 20, 2025 · 2 comments · May be fixed by #4662
Open
2 of 4 tasks

Baritone can't mine flowers next to the world boarder #4654

pennilessSplatter opened this issue Feb 20, 2025 · 2 comments · May be fixed by #4662
Labels
bug Something isn't working

Comments

@pennilessSplatter
Copy link

pennilessSplatter commented Feb 20, 2025

Some information

Operating system:
Java version: Runtime 21.0.1
Minecraft version: 1.21.3
Baritone version: 1.11.1 (latest)
Other mods (if used): Plenty honestly. It's a lot of fps improvement mods and other client side mods. I don't think this issue is relating to any mod interference but I'll write them here if you need me to.

Exception, error or logs

How to reproduce

For some reason Britone is unable to mine flowers next to the world boarder. It paths to the flower just fine, but it doesn't break it when it arrives. I have to break it manually.

The flower must be next to the world boarder, not in it or past it. However if the flower is only 1 block away or more. It can mine it just fine.

Modified settings

It's also alot. I'll add them if I need to.

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.
@pennilessSplatter pennilessSplatter added the bug Something isn't working label Feb 20, 2025
@ZacSharp
Copy link
Collaborator

If I'm correct about the reason for this, this should happen with anything Baritone can walk through. Other blocks will be ignored when next to or outside the world border.

Firstly, for canWalkThrough blocks just walking into them won't do the trick. Path execution will walk into them and that's it (honestly I was surprised mining them works anyway). However, there's a second mechanism by which MineProcess can break blocks:
If a target block is in the same xz column as the player and at or above foot height and breaking it won't trigger falling blocks or risk unblocking liquids, then MineProcess will break it.

The check for falling blocks/liquids happens in MovementHelper.avoidBreaking, which also returns true right next to the world border. Normally that's not a problem since MovementHelper.getMiningDurationTicks reports any such block as being unbreakable and MineProcess will completely ignore inbreakable blocks.
However, if a block is canWalkThrough there is no reason for movements to break it, so getMiningDurationTicks shortcuts and returns 0, making MineProcess include it in the pathfinder goal even though it won't be able to break the block.

(I'll hopefully have a fix tomorrow; should be as simple as explicitly checking avoidBreaking)

@pennilessSplatter
Copy link
Author

If I'm correct about the reason for this, this should happen with anything Baritone can walk through. Other blocks will be ignored when next to or outside the world border.

Firstly, for canWalkThrough blocks just walking into them won't do the trick. Path execution will walk into them and that's it (honestly I was surprised mining them works anyway). However, there's a second mechanism by which MineProcess can break blocks: If a target block is in the same xz column as the player and at or above foot height and breaking it won't trigger falling blocks or risk unblocking liquids, then MineProcess will break it.

The check for falling blocks/liquids happens in MovementHelper.avoidBreaking, which also returns true right next to the world border. Normally that's not a problem since MovementHelper.getMiningDurationTicks reports any such block as being unbreakable and MineProcess will completely ignore inbreakable blocks. However, if a block is canWalkThrough there is no reason for movements to break it, so getMiningDurationTicks shortcuts and returns 0, making MineProcess include it in the pathfinder goal even though it won't be able to break the block.

(I'll hopefully have a fix tomorrow; should be as simple as explicitly checking avoidBreaking)

Ohh I see that makes so much sense. There's actually another bug that might be related to this, when when I instruct baritone to break sugar cane. Ot walka into the cane, and looks at the bottom block without breaking it. Probably because theres other sugar cane in the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants