mindcraft/patches/mineflayer-pathfinder+2.4.5.patch

22 lines
1 KiB
Diff
Raw Normal View History

2024-08-22 15:57:20 -05:00
diff --git a/node_modules/mineflayer-pathfinder/index.js b/node_modules/mineflayer-pathfinder/index.js
index b38bd30..ae3754f 100644
--- a/node_modules/mineflayer-pathfinder/index.js
+++ b/node_modules/mineflayer-pathfinder/index.js
@@ -541,7 +541,7 @@ function inject (bot) {
let canPlace = true
if (placingBlock.jump) {
bot.setControlState('jump', true)
- canPlace = placingBlock.y + 1 < bot.entity.position.y
+ canPlace = placingBlock.y + 1.9 < bot.entity.position.y
}
2024-08-22 15:57:20 -05:00
if (canPlace) {
if (!lockEquipItem.tryAcquire()) return
@@ -557,6 +557,7 @@ function inject (bot) {
.then(function () {
// Dont release Sneak if the block placement was not successful
bot.setControlState('sneak', false)
+ bot.setControlState('jump', false)
if (bot.pathfinder.LOSWhenPlacingBlocks && placingBlock.returnPos) returningPos = placingBlock.returnPos.clone()
})
.catch(_ignoreError => {