Replies: 1 comment
-
To get the nearest hostile mob you would use this code (I havn't tested it but believe it should work): const filter = e => entity.kind === 'Hostile mobs'
const nearestMob = bot.nearestEntity(filter) Hope this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get the closest hostile mob to the bot using this code
bot.nearestEntity(({ kind }) => kind === false)
but it just returns null
Beta Was this translation helpful? Give feedback.
All reactions