-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
- 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.
- 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.
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. |
…e onlyMineInSelection.
…the setting to the wrong thing
Simplifies mineOnlyInsideSelection condition Co-authored-by: ZacSharp <68165024+ZacSharp@users.noreply.github.com>
when will this be added? |
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 #2597fixes #2249
This could also be seen as a fix for mining around "home" (#2054) however that could be made to work nicer