bot.dig doesn't fail even if physically impossible #3494
Labels
possible bug
Stage1
just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Versions
Detailed description of a problem
Invoking
dig
on the bot for a block, even when not physically possible, triggers the mining animation. However the "mining-texture" is not visible (expected), the block doesn't break (expected) and the digging command completes as if it was successful (unexpected).Cases where this happens:
spawn-protection=16
spectator
and usuallyadventure
)What did you try yet?
Using the
examples/digger.js
to isolate the problem and invokedig
for a block within and outside the spawn protected area.Your current code
Expected behavior
When digging fails (no matter the circumstances), it should throw an exception and thus follow the
catch
path and it should trigger thediggingAborted
event.Additional context
try catch
blocks.bot.canDigBlock(block)
/op BOT
to add the bot to op list,/deop BOT
to remove.)The text was updated successfully, but these errors were encountered: