Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
aesthetic0001 committed Feb 4, 2024
1 parent dc5e410 commit 2547f5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ function inject (bot) {
let dx = nextPoint.x - p.x
const dy = nextPoint.y - p.y
let dz = nextPoint.z - p.z
const yChangeFromGround = lp ? p.y - lp.y : 0

/* eslint-disable multiline-ternary */
// const direction = previousNode ? {
Expand All @@ -594,7 +593,7 @@ function inject (bot) {

// console.log(direction)

if (Math.abs(dx) <= (yChangeFromGround >= 1.5 ? 1.25 : 0.5) && Math.abs(dz) <= (yChangeFromGround > 1.5 ? 1.25 : 0.5) && Math.abs(dy) < 12) {
if (Math.abs(dx) <= (!bot.entity.onGround ? 1.25 : 0.5) && Math.abs(dz) <= (!bot.entity.onGround ? 1.25 : 0.5) && Math.abs(dy) < 12) {
// arrived at next point
lastNodeTime = performance.now()
if (stopPathing) {
Expand Down

0 comments on commit 2547f5d

Please sign in to comment.