PrismarineJS/prismarine-viewer

Ghost entities from logged out players #174

drmzio posted onGitHub

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/

Image 2021-03-26 at 12 06 12 PM

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


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.

posted by drmzio about 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests