Crash in physics.js when explosion occurs (Mineflayer 4.27.0, MC 1.21.4) #3635
Labels
possible bug
Stage1
just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Environment
Problem
The bot crashes whenever an explosion happens nearby (e.g., TNT or Creeper).
It crashes inside
mineflayer/lib/plugins/physics.js
at line 299 whenever it tries to process explosionI think it has something to do with insanely large vector in player knockback.
What did you try yet?
At first, I thought it was caused by my own bot code (~1000+ lines), but I reproduced the bug using a minimal Mineflayer bot that just connects and spawns.
I tested this on:
All setups crash instantly on any explosion.
Minimal Reproduction code
Expected behavior
The bot shouldn't crash when an explosion occurs nearby.
Instead, it throws a
TypeError
trying to access property which is undefined ;-;##Error
Additional context
I am a beginner to both GitHub and JavaScript . Sorry if i misunderstood something. I tried to include every relevant information!
The text was updated successfully, but these errors were encountered: