You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a code that made my bot fish, it worked, but when I rewrote it into classes, it began to give an error "Cannot read properties of undefined (reading 'entity')" in the onCollect function. I checked and the entity is being passed. I play on 1.20.1
`const {pathfinder, Movements, goals : {GoalNear, GoalFollow}} = require('mineflayer-pathfinder');
let nowFishing = false;
module.exports = class Fishing {
static bot;
static mcData;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I had a code that made my bot fish, it worked, but when I rewrote it into classes, it began to give an error "Cannot read properties of undefined (reading 'entity')" in the onCollect function. I checked and the entity is being passed. I play on 1.20.1
`const {pathfinder, Movements, goals : {GoalNear, GoalFollow}} = require('mineflayer-pathfinder');
let nowFishing = false;
module.exports = class Fishing {
static bot;
static mcData;
}
`
Beta Was this translation helpful? Give feedback.
All reactions