PrismarineJS / mineflayer-collectblock

A simple utility plugin for Mineflayer that add a higher level API for collecting blocks.
MIT License
39 stars 25 forks source link

Don't store block references in targets list #34

Open TheDudeFromCI opened 3 years ago

TheDudeFromCI commented 3 years ago

Blocks are not permanent references in Mineflayer. Each time a block is updated, it created a new block object. So storing blocks as direct references in the target list leads to only storing how they were before they were targeted. Things like checking if the block has been changed or destroyed no longer works.

MichaelLykkeStrand commented 3 years ago

Any ETA on a fix? :)

TheDudeFromCI commented 3 years ago

@MichaelLykkeStrand Should be fixed when https://github.com/PrismarineJS/mineflayer-collectblock/pull/42 is finished,

ychunwei commented 3 years ago

Hi, just checking in to see if there are workarounds for this?

This is because I want to have two or more bots interact with each other and was wondering what happens when the block is mined by a bot before another one gets there.

Is there like a timeout function that just makes the bot move on to the next block?

Also just curious when this bug could be resolved.

Keep up the good work!

TheDudeFromCI commented 3 years ago

Hi, just checking in to see if there are workarounds for this?

This is because I want to have two or more bots interact with each other and was wondering what happens when the block is mined by a bot before another one gets there.

Is there like a timeout function that just makes the bot move on to the next block?

Also just curious when this bug could be resolved.

Keep up the good work!

At the moment, the bot will get stuck when trying to mine a block that is already broken and will stand still forever. Sadly, there are not really any current workarounds at the moment without modifying the plugin directly.