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;