Prioritizing mining over avoidance
bphd opened this issue ยท 1 comments
Some information
Operating system: Any
Java version: Any
Minecraft version: Any
Baritone version: 1.6.2
Forge mods (if used): 35.1.4
Exception, error or logs
Not related
How to reproduce
#avoidance
#set mobAvoidanceCoefficient X
(Occurs at any coefficients)
#mine X
(Occurs for any blocks)
Modified settings
See reproduce
What's expected
Prioritizing avoidance over mining, so blacklisting any blocks too near to mobs accordingly to mobAvoidanceCoefficient
, so stopping mining if he doesn't find any whitelisted blocks to mine
What occurs
Effectively avoid mobs as long as there're blocks to mine far from mob. But as soon as there isn't any left (so only blocks near to mobs left), completely ignore the avoidance asked and go mining near mobs
Which leads to death if afk
Workaround
Watch (with eyes) the bot actions and deactivate it (with command typing) when he is too near to mobs to manually (need to not be afk) avoid mobs and reach new zones where there's block non-surrounded by mobs (by moving the player by ourselves with keyboard inputs) and reactivate it (with command typing)
Solution
A possible solution should be to blacklist blocks near to mobs at time of analysis (the bot seems to be able to blacklist blocks that will be difficult to mine, and seems to be able to identifies mob position too, so combining block and mob positions should give blocks to blacklist), and maybe reanalyze the blacklisted blocks when there's no whitelisted blocks left to mine, and if it stills blacklist them all, depending on the setted timeout, either reanalyze, either deactivate mining (this function seems to already being implemented, so only the blacklist part seems to be to develop)
If this particular blacklisting function already exists, so it should be a bug correction rather than an enhancement where you should find what messes with that function that leads to try hugging mobs. I published as a bug because the avoidance function itself have in it's definition this behaviour (otherwise it's only a partial avoidance, so it's useless because it fails at his function), so it's more a correction than a new function
Other
For testing purposes, to completely isolate the phenomenon I've created a terrain where I begin in the right, I place the block to mine under the feet of the zombie and another one to the left, and it works as expected (please only consider the zombie between the fences, the other ones spawned after the test, when I took the screenshot)
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.