baritone icon indicating copy to clipboard operation
baritone copied to clipboard

Baritone falls into lava in Open Nether

Open EvilSourcerer opened this issue 7 years ago • 13 comments

If you walk through open nether for long enough, the server will load new chunks which have lava flowing from the ceiling, which starts slowly flowing down. Baritone does not recognize this and walks into the flowing lava.

EvilSourcerer avatar Nov 12 '18 17:11 EvilSourcerer

This one is quite tricky to be honest. I don't have a good solution in mind. Baritone does verify future costs, and if a future movement becomes impossible it will stop 5 steps beforehand. However there is no real fix for if lava falling from the ceiling happens to land right on top of it.

leijurv avatar Nov 13 '18 00:11 leijurv

Constant obstacle avoidance WorldScanner, LUL

ZeroMemes avatar Nov 13 '18 00:11 ZeroMemes

Every tick scan for unsupported lava or lava that's still expanding its flow, if there's any near the path just cancel immediately!

leijurv avatar Nov 13 '18 00:11 leijurv

Some pseudocode to get you started ( Souper inefficient but whatever you know how to optimize it probably ) :

ArrayList<BlockPos> lavacoords=GetBlockCoords("Lava");
boolean blockspath=false;
for(BlockPos b : lavacoords)
{
  for(int i=b.yCoord; i>0; i--)
  {
      BlockPos newblock=new BlockPos(b.xCoord,i,b.yCoord);
      if(newblock.isSolid())
      {
        // I'm too lazy to write the checks for the lava flow, but basically simulate lava spreading if the block below is solid. Then check if it blocks the path. Example : 
        if(CheckIfBlocksPath(newblock.xCoord+2,newblock.yCoord,newblock.zCoord+1))
        {
          blockspath=true;
          break;
        }
      }
      else
      {
        // If it's air then continue down
      }
  }
}

EvilSourcerer avatar Nov 13 '18 00:11 EvilSourcerer

THIS IS NOT IT

0-x-2-2 avatar Nov 13 '18 00:11 0-x-2-2

thank you @EvilSourcerer i may incorporate something similar to that (just to annoy @0-x-2-2)

leijurv avatar Nov 13 '18 00:11 leijurv

To be clear, if lava spreads into a future movement from the side or above, it will notice and cancel the path up to 5 movements ahead. This is only when lava spreads into its current movement from the side or above. https://youtu.be/6gIfONb6V7U

leijurv avatar Nov 13 '18 00:11 leijurv

Wow this is issue #256! What a round number!

EvilSourcerer avatar Nov 13 '18 15:11 EvilSourcerer

Was the update pushed out yet? Can you notify me when the appropriate commit is done?

EvilSourcerer avatar Nov 21 '18 03:11 EvilSourcerer

I will let you know with a commit fixing this issue if/when that happens, however I have not thought of a good way to fix this. As I've said, it can only happen when lava falls directly on top of, or enters from the side, your current movement, not a future one, so no form of cost calculation can predict this. Therefore it just needs to be a heuristic that looks at where lava is spreading, or running it at faster tick speed to see where it will spread, or just looking for unsupported lava and ignoring sideways-spreading lava (which is not the best).

leijurv avatar Nov 21 '18 03:11 leijurv

image

yes I get it lol, will look into this =)

leijurv avatar Nov 21 '18 17:11 leijurv

cool meme

EvilSourcerer avatar Nov 26 '18 00:11 EvilSourcerer

It's really hot... I fall in this bug and find this 7 years ago issue. Hope the bug could be fixed as soon.

BI4PYM avatar Jun 22 '25 12:06 BI4PYM