Comments (4)
You can turn bot.pathfinder.thinkTimeout to a higher value. The default is 40ms. Higher values will give more stable results but can cause issues since a physics tick is only 50ms. This is usually okay if you aren't running the pathfinder every frame, however.
from mineflayer-pathfinder.
You can turn bot.pathfinder.thinkTimeout to a higher value. The default is 40ms. Higher values will give more stable results but can cause issues since a physics tick is only 50ms. This is usually okay if you aren't running the pathfinder every frame, however.
I have tested changing this value prior to opening this issue, however, I get the same/similar results each time. Are you not experiencing the same timeouts/incorrect paths when testing what I described above?
from mineflayer-pathfinder.
Update:
For anyone who may be interested. I have "solved" this, but it's very hacky, and it should be resolved via that actual pathfinding mechanics. Essentially my hotfix is a position checker that is run every physicTick. bot.on calls a checker function I made. The way this function works is checking if the bot has a target player or location variable set. If it does, it checks if the bot is moving. If the bot is moving, then do nothing. If the bot has stopped moving and the absolute value of its position minus the target position x y or z is greater than a threshold (I have 0.6 of a block) then it will reset its goal to be that target players position and or the Vec3 coordinate position variable (that I have made, so that I may tell the bot to go to certain coordinates).
This works wonders and the bot will now tower up until reaching the specified coordinates or player (no longer stops beneath them for no reason).
Issues with this:
-
Even if you set the bot to follow the player and set dynamic to false.. it will still go to the player's updated position because the bot is still essentially "stopping" and recalculating paths, and in the checker function I re-specify the bots goal. (This could be solved quite easily but I doubt I'd bother with such a hacky fix in the first place.
-
The bot really doesn't know how to path downwards, it will either run in circles or will break and place a block continuously for no reason (even if there is a way to get down via breaking their tower). However, I don't believe this is a bug that my code introduced as I have experienced this earlier on when just playing with the pathfinding methods and the lot.
Comments:
I am sure my way of doing this is incredibly inefficient, however, at this stage it's not my intention for it to be clean, I was just messing around with it and seeing what I could do. To be honest I am just learning JS as I go and this is the first API I've ever worked with.
from mineflayer-pathfinder.
This was not a timeout issue this time but a legitimate bug in the move generation logic preventing it to plan towers of more than 1 block high. Should be fixed now.
Thanks for reporting it!
from mineflayer-pathfinder.
Related Issues (20)
- Possible bug: Error while creating a movement HOT 2
- Bot randomly fails to place blocks when scaffolding HOT 4
- The bot does not enter the server (fabric)
- Bot can't go through doors HOT 2
- Bot never goes under layer 0 HOT 2
- Not working with Mineflayer 4.5.1? HOT 8
- Saying the the mcdata script in the Movements script is undefinded in the code this.blocksCantBreak.add(mcData.blocksByName.chest.id) HOT 3
- Typo HOT 8
- Bot tries to open fence gate that is already open HOT 4
- Bot thinks it can travel diagonally when blocked by other blocks HOT 4
- Bot trying to open the chest?¿? when he's walking on the chest HOT 3
- Bot goes to unexpected ways HOT 1
- (python) TypeError: Cannot read properties of null (reading 'blocksByName') HOT 2
- Stuck in dripstone HOT 1
- The code that is completely identical to the example that used to work normally does not work. HOT 8
- Bot Constantly Stuck or Halts with GoalFollow - HOT 2
- Failed to find path including bottom slabs
- GoalPlaceBlock ask HOT 1
- [Feature request] Creative/Flight navigation HOT 1
- goal_reached doesnt activate at all
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mineflayer-pathfinder.