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

Add only mining in of selections #3389

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

scorbett123
Copy link
Collaborator

@scorbett123 scorbett123 commented Apr 11, 2022

Filter out any positions that aren't valid according to only mining inside selections, or only mining outside of selections.

I'm not really sure about the setting naming here, or even if this is the best way to do the settings, so any input on this would be appreciated.

partially fixes #3320 (this contains two suggestions)
fixes #2597
fixes #2249

This could also be seen as a fix for mining around "home" (#2054) however that could be made to work nicer

Copy link
Collaborator

@ZacSharp ZacSharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super simple and that's a pretty good argument on its own so feel free to ignore the rest of this comment, I'm just making things more complex in some sense.

I have two main concerns

  1. This per game run instead of persistent per dimension. People asking for a protection radius around home waypoints likely don't want to select their base every time they join the server.
  2. This does not help for #farm escaping and breaking things and also doesn't stop #goto from making its own "door" a.k.a. hole-in-the-wall

I'd like to have a system that can be used by any command/process, is persistent per dimension and if possible doesn't require two settings per action supporting it.
My current and not yet thought through idea is to have a command to turn selections into named areas which are saved together with other dimension specific data (like waypoints). Since location dependent settings are very unlikely to happen those areas can then be given tags which are used by whatever wants to use them.
For example mine could prune anything inside a region tagged with "pleaseDontMineHere" (name intentionally bad) or have a setting to list the appropriate tags (but then we could just as well not use tags and list the region names instead, maybe that would also allow for better efficiency).

If we are to do this in a persistent way we definitely need a way to distinguish between different functions of selections or the user will have to redo their selection whenever they do something else, which is not much better than the current state.

src/api/java/baritone/api/Settings.java Outdated Show resolved Hide resolved
@scorbett123
Copy link
Collaborator Author

Looking at making this work for everything and per waypoint, maybe MovementHelper.avoidBreaking could go through all the waypoints with a tag "don't mine for X blocks from here", and return true if it is in any of those regions. However this is pretty likely to cause more lag.

I think mining only in a selection is something that you probably don't want to be persistent, as #2249 probably doesn't want it to be persistent, but out of selections should probably be persistent, using the waypoint system.

For now I'm going to remove the "onlyMineOutOfSelection" option, however I still think the onlyMineInSelection is a good addition.

Simplifies mineOnlyInsideSelection condition

Co-authored-by: ZacSharp <68165024+ZacSharp@users.noreply.github.com>
@scorbett123 scorbett123 changed the title Add only mining in / out of selections Add only mining in of selections Apr 13, 2022
@kittenvr
Copy link

kittenvr commented May 9, 2024

when will this be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants