mineflayer-collectblock icon indicating copy to clipboard operation
mineflayer-collectblock copied to clipboard

Don't store block references in targets list

Open TheDudeFromCI opened this issue 4 years ago • 4 comments

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.

TheDudeFromCI avatar Nov 08 '20 06:11 TheDudeFromCI

Any ETA on a fix? :)

MichaelLykkeStrand avatar Dec 22 '20 05:12 MichaelLykkeStrand

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

TheDudeFromCI avatar Dec 23 '20 17:12 TheDudeFromCI

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!

ychunwei avatar Feb 21 '21 08:02 ychunwei

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.

TheDudeFromCI avatar Feb 21 '21 10:02 TheDudeFromCI