PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.96k stars 904 forks source link

Boss bar #639

Closed ArtFect closed 5 years ago

ArtFect commented 6 years ago

Am I blind or is there no way to get custom boss bar text? I tried to find wither or dragon in bot.entities but they aren't there

plexigras commented 6 years ago

i dont think there is a mineflayer plugin that handles this

but you could write one or you could just do bot._client.on('boss_bar", ... )

http://prismarinejs.github.io/minecraft-data/?d=protocol#toClient_boss_bar

also then you might want to parse the title field using new ChatMessage(title)

https://github.com/PrismarineJS/mineflayer/blob/master/lib/chat_message.js

rom1504 commented 6 years ago

We should probably handle that mineflayer. This is a new feature so it's not handled but it should be, if you have some code that implement it, please share it. Otherwise it should still be implemented, reopening.

rom1504 commented 6 years ago

If someone is interested, please finish https://github.com/PrismarineJS/mineflayer/pull/659 I'm not merging a half-done feature like that, closing the pr since it's dead.

rom1504 commented 5 years ago

now done, thanks @wvffle