Open drmzio opened 3 years ago
So far, I've tried destroying the viewer and re-creating it at every spawn using the code below.
const createViewer = () => {
// Destroy the current viewer if exists.
if (bot.viewer) {
bot.viewer.close();
bot.viewer = undefined;
}
mineflayerViewer(bot, { port: process.env.PORT || 3000 });
};
bot.on('spawn', () => {
createViewer();
});
But the issue still persists with the "ghost" entities.
Bot has been running for ~24 hours on a Heroku Dyno on MC server
play.oc.tc
and it appears that there are "ghost" entities visible in the viewer. Possible bug? https://mineflayer-occ-bot.herokuapp.com/Fyi: The server frequently rotates between maps and it confuses the viewer (renders nothing). Is there a way to do something like a "hard reload" through the API?
Here's the source code for the bot: https://github.com/drmzio/mineflayer-occ-bot