PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.79k stars 880 forks source link

bot.findBlocks fails when using ViaBackwards #2347

Open 4P5 opened 2 years ago

4P5 commented 2 years ago

Versions

Detailed description of the problem

When using the plugin ViaBackwards to allow 1.17.x clients to join on a 1.18.x server, bot.findBlocks fails to find many blocks. It works perfectly fine in 1.17.x servers.

Steps to reproduce

I'm currently using this example. To reproduce, create a 1.18.x server and install the ViaBackwards plugin. Then, run the example script and try some commands: find stone, find copper_block, etc. The result will be 0 blocks, even if many are present.

Expected behavior

Running the above commands on a 1.17.x server will correctly count the blocks. I've noticed it correctly identifies blocks (e.g., if given a fake input like minecraft:waxed_emerald_bricks, it will refuse the block), but something goes wrong while searching. Successful searches also take longer than the ones that fail.

constantins2001 commented 2 years ago

I'm also seeing this issue

constantins2001 commented 2 years ago

Further context: I believe something between filtering and returning the list goes wrong, as the filter function sees all blocks (kinda odd). The returned list of blocks does not contain all or any of the blocks which were indicated to be matching by the filter.

rom1504 commented 2 years ago

can you try again? I believe it might work now

constantins2001 commented 2 years ago

It does not