PrismarineJS / prismarine-physics

Provide the physics engine for minecraft entities
MIT License
35 stars 39 forks source link

Fix 1.19 Water Physics #88

Closed ATXLtheAxolotl closed 1 year ago

ATXLtheAxolotl commented 1 year ago

This PR should resolve PrismarineJS/mineflayer#2796, the issue was that both lavaGravity and waterGravity were never set because proportionalLiquidGravity was not set to yet support 1.19, this later down the line caused issues, especially on line 459 because the statement would be evaluated as (entity.isInWater ? undefined : undefined) * gravityMultiplier thus returning NaN, throwing everything off and causing our y value to be NaN when we would send movement packets which caused the bot to be disconnected.

ATXLtheAxolotl commented 1 year ago

Oops need to do the lint fix

rom1504 commented 1 year ago

Thanks