Prismarine Web Client is a browser-based Minecraft client that allows users to connect to and interact with Minecraft servers directly from a web page. It leverages the `mineflayer` library for high-level bot API interactions and `prismarine-viewer` for 3D world rendering within the browser. The current stable version is 1.6.0, with releases appearing somewhat frequently, indicating active development. A key differentiator is its ability to run entirely client-side in a web browser, connecting to standard Minecraft TCP servers via an intermediary WebSocket-to-TCP proxy that is bundled and managed by the CLI tool. This package is primarily distributed as a globally installable command-line tool that serves the client application, rather than a library intended for direct `import` into other JavaScript projects for code-level integration. Developers can interact with the running client's core functionalities, such as the `bot` instance and `viewer` for debugging and custom extensions, through global `window` objects.
npm install prismarine-web-clientVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to globally install, run, and then interact with the served Minecraft web client via browser console commands.
Ensure the `prismarine-web-client` CLI is running correctly, as it provides the necessary proxy and web server for the client.
Access these objects directly via the `window` global in the browser's developer console or in custom scripts injected into the web page after the client has loaded.
Consider disabling auto-saving features in your Integrated Development Environment (IDE) or exploring Webpack configuration options for more granular control over rebuild triggers to optimize the development experience.
Ensure the web client is fully loaded in your browser and that you are interacting with the correct browser window's developer console. Verify access via `window.bot`.
Verify that `prismarine-web-client` is running in your terminal and listening on the expected port (default `8080`). Check for any local firewall rules or network issues preventing connection to `localhost`.
To run the client, use the global installation and execution commands: `npm install -g prismarine-web-client` followed by `prismarine-web-client`. If you intend to use underlying functionalities like the Minecraft client API or 3D viewer programmatically in a separate project, install and import `mineflayer` or `prismarine-viewer` directly.