Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Have baritone cancel task when within range of a player

lolzhunter opened this issue ยท 10 comments

commented

Basically Im thinking to have the bot scan for players, and when it recognises a player it automatically cancels the task it is performing

You could customise the settings as to have certain players whitelisted where they won't trigger this function, there can also be a set block range from server render distance to like 5 blocks apart, it can also restart the task when they are out of range for x amount of time, and it can also disconnect you from the game instead of canceling the task, or just simply run away from the person, a limit of how many people can be in range before it stops what it's doing can also be set, but that option isnt as useful as the other ones

I feel it would improve Baritone as using this functionality you can effectively "stalk" people in game, since the follow command just follows them without being hidden, having this mode turned on can allow baritone to follow people but not get too close otherwise it stops, it can be also used for things such as baritone avoiding conflict with players while it completes its task, or to hide from players that baritone is being used as some servers count it as cheating. Of course that's just a couple of the things that came to mind that you could use it for, there's most likely alot more that I haven't mentioned that could be done with this feature.

. Baritone kills the process if player is in range
. Certain players can trigger it and vice versa
. Set ranges for how close a player has to be for baritone to trigger the function
. Set the amount of time the player has to be out of range for, for baritone to restart the task
. Set the way baritone fixes the issue either by disconnect, canceling task, or simply walking away

commented

This would fix the issue of being teleported to spawn for glitching (and continuing to mine protected blocks). Or would if could trigger a macro like /home to get to safety. Great idea lolzhunter.

commented

Thanks man

commented

i like this idea as well

commented

if no one makes this i might consider adding this myself
EDIT: im working on adding this for you guys

commented

Thanks man, really appreciate it, it should be relatively easy to add because it utilises existing code like the scan feature, all it should take is alot of if statements like if player distance less than x then do x

commented

Actually a better way would be to set a radius and if player entered the radius then do something

commented

yeah that would be a good and simple way to do it, id implement myself if i knew anything about java and as a extension minecraft mod coding

commented

ofc like i said id prefer options instead of just stopping, so instead of stop it would probably be some if statements to execute certain different codes depending on what the user set

commented

This could be easily done by getting the nearest player and then using getDistancetoEntity to get the distance, and if it's <= the radius, stop.

commented

if no one makes this i might consider adding this myself
EDIT: im working on adding this for you guys

Have you already add it?