diff --git a/patches/mineflayer-pathfinder+2.4.5.patch b/patches/mineflayer-pathfinder+2.4.5.patch index 94d7c75..26a2c73 100644 --- a/patches/mineflayer-pathfinder+2.4.5.patch +++ b/patches/mineflayer-pathfinder+2.4.5.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/mineflayer-pathfinder/index.js b/node_modules/mineflayer-pathfinder/index.js -index b38bd30..069c1af 100644 +index b38bd30..fb39b45 100644 --- a/node_modules/mineflayer-pathfinder/index.js +++ b/node_modules/mineflayer-pathfinder/index.js @@ -170,6 +170,16 @@ function inject (bot) { @@ -19,7 +19,17 @@ index b38bd30..069c1af 100644 if (b && (b.type === waterType || ((b.type === ladderId || b.type === vineId) && i + 1 < path.length && path[i + 1].y < curPoint.y))) { curPoint.x = Math.floor(curPoint.x) + 0.5 curPoint.y = Math.floor(curPoint.y) -@@ -550,6 +560,7 @@ function inject (bot) { +@@ -524,6 +534,9 @@ function inject (bot) { + bot.activateBlock(bot.blockAt(new Vec3(placingBlock.x, placingBlock.y, placingBlock.z))).then(() => { + lockUseBlock.release() + placingBlock = nextPoint.toPlace.shift() ++ if (!placingBlock) { ++ placing = false ++ } + }, err => { + console.error(err) + lockUseBlock.release() +@@ -550,6 +563,7 @@ function inject (bot) { lockEquipItem.release() const refBlock = bot.blockAt(new Vec3(placingBlock.x, placingBlock.y, placingBlock.z), false) if (!lockPlaceBlock.tryAcquire()) return @@ -27,7 +37,7 @@ index b38bd30..069c1af 100644 if (interactableBlocks.includes(refBlock.name)) { bot.setControlState('sneak', true) } -@@ -557,6 +568,7 @@ function inject (bot) { +@@ -557,6 +571,7 @@ function inject (bot) { .then(function () { // Dont release Sneak if the block placement was not successful bot.setControlState('sneak', false)