PrismarineJS / mineflayer-navigate

mineflayer plugin which gives bots a high level 3d navigating API using A*
59 stars 22 forks source link

Don't run through fire #4

Closed thejoshwolfe closed 11 years ago

thejoshwolfe commented 11 years ago

or other hazardous blocks. it's also rude to walk through crops. should we avoid tripping redstone triggers as well (pressure plates, trip wires, etc.)? perhaps there should be a parameter that is a list of ids to avoid.

andrewrk commented 11 years ago

I think this list should live in navigate, not mineflayer

andrewrk commented 11 years ago

Proposed API:

bot.navigate.blocksToAvoid = {
  51: true, // fire
  59: true, // wheat
  ...
}

And it should come with sensible defaults.

And then in the code, isSafe will check this property and return false if it is a block to avoid.

thejoshwolfe commented 11 years ago

sounds good