Mining bots missing some ores #3
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bans-minecraft/bans-automata#3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The mining bots seem to be sometimes missing ores. I think this might be to do with the population of the AA whilst excavating. The
excavationScan
function builds a table of blocks surrounding the bot, which it uses to populate a table of blocks to excavate. Notice that each call of the formself.bot:query()
is not passingtrue
to the query method. This means that, if theAANode
returned isAANode.EMPTY
, we're not actually populating it with the real block. In which case, it is possible for us to actually skip some blocks if we never actually turn to them during excavation. This is probably why we only see one or two ore blocks being missed.We should change the
excavationScan
function to passtrue
to each of the query functions, which will prompt the bot to scan that direction (possibly with a temporary turn) in order to fill out the AA.This could be what is causing #1.
Looking at the code for
query
, it doesn't seem that we need to set therefresh
argument totrue
for the bot to perform a new scan in the required direction. In fact, settingrefresh
forces the AA to be refreshed:This may well have been due to #2, where the bot inventory was getting filled up with things like cobbled deepslate. This has since been addressed by dropping unwanted items after each excavation.
It is indeed true that the bot has not been collecting Fluorite. This is due to the ores list containing a misspelling.