Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Avoid flowing lava killing players

Antigravityd opened this issue ยท 4 comments

commented

Explanation

There are 3 ways in which this happens under normal Nether exploration conditions. First, when the bot bridges across a one-deep lava stream right as the lava falls down a block such that the lava flows onto the block just placed, killing the bot. Secondly, when (as I understand it) lava that has incompletely flowed is unloaded and then reloaded by a bot, it does not continue to flow unless it receives a block update. If this happens as a result of the bot placing it for a path, it often flows onto the path, killing the bot. Lastly when new chunks have ceiling sources that flow down onto a previously calculated path, sometimes while the bot is in that block.

This could be avoided by identifying contiguous bodies of liquid and classifying them as potentially flowing or not. In the third case, performing Minecraft's calculation of liquid flow to its completion and then running pathfinding on the terrain with the liquids fully flowed should suffice. In the first and second, performing the liquid flow calculation to its completion on all paths that contain block placings adjacent to liquids (doing the calculation on the environment as it would be after the placement of these hypothetical blocks, of course) and reevaluating the safety of the path afterward would work.

Context

In its current state, Baritone isn't AFKable. Setting a #goto to some far-out coords in the Nether and leaving it overnight gets the bot killed approximately every 50k blocks. It is certainly better than walking it by hand, but constant human monitoring and waypoint-setting is pretty tedious. I think a fire-and-forget pathfinder is what both Baritone's users and creators had in mind, and this issue is a substantial obstacle to that end.

commented

This issue still exists

commented

There's a fourth way this can happen. Baritone is smart enough to not mine a block that would make lava flow, and to not have falling sand/gravel injure the player, however I observed that if sand/gravel is supporting lava, baritone will break the sand/gravel and make the lava start flowing, sometimes onto the player.

commented

Found another case:
When bot pathes through this gap, it does so diagonally and by doing this, touches the lava and lights on fire.

2020-10-01_14 40 23