Skip to content

Commit

Permalink
Update physics.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aesthetic0001 authored Dec 11, 2023
1 parent 4731d58 commit fddb64f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plugins/physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit fddb64f

Please sign in to comment.