From fddb64f50fcc379970afccff8f86b8d94be0c131 Mon Sep 17 00:00:00 2001 From: aesthetic <15858616+aesthetic0001@users.noreply.github.com> Date: Sun, 10 Dec 2023 22:07:30 -0500 Subject: [PATCH] Update physics.js --- lib/plugins/physics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/physics.js b/lib/plugins/physics.js index 0422cf147..5d157fdf4 100644 --- a/lib/plugins/physics.js +++ b/lib/plugins/physics.js @@ -187,7 +187,7 @@ function inject(bot, {physicsEnabled, maxCatchupTicks}) { if (lastSent.sprintState !== controlState.sprint) { bot._client.write('entity_action', { entityId: bot.entity.id, - actionId: bot.entity.sprintState ? 3 : 4, + actionId: controlState.sprint ? 3 : 4, jumpBoost: 0, }); lastSent.sprintState = controlState.sprint; @@ -196,7 +196,7 @@ function inject(bot, {physicsEnabled, maxCatchupTicks}) { if (lastSent.sneakState !== controlState.sneak) { bot._client.write('entity_action', { entityId: bot.entity.id, - actionId: bot.entity.sneakState ? 0 : 1, + actionId: controlState.sneak ? 0 : 1, jumpBoost: 0, }); lastSent.sneakState = controlState.sneak;