No description
  • TypeScript 92.9%
  • JavaScript 3.3%
  • CSS 2.8%
  • HTML 1%
Find a file
Vitaly d546fa8f41 enable strict null types which improves quality of codebase a lot!
todo add types to worker & world renderer
2023-11-01 03:07:07 +03:00
.github/workflows feat: new scalable options GUI. Refactored options & main menu to React 2023-10-11 19:38:16 +03:00
.storybook add storybook & react button component, refactor styles a bit 2023-10-10 17:06:23 +03:00
.vscode add playground tasks 2023-10-20 00:49:49 +03:00
assets add storybook-bg 2023-10-10 15:28:17 +03:00
cypress update singleplayer test 2023-10-26 05:24:29 +03:00
experiments add playground page that I was using for testing various things (eg textures) 2023-10-20 01:58:42 +03:00
prismarine-viewer enable strict null types which improves quality of codebase a lot! 2023-11-01 03:07:07 +03:00
scripts copy entity directly from assets, various generator fixes 2023-10-26 04:51:23 +03:00
src enable strict null types which improves quality of codebase a lot! 2023-11-01 03:07:07 +03:00
.dockerignore Added docker support, made config dynamic (#108) 2021-03-21 17:14:14 +01:00
.eslintignore add dive, fix eslint 2023-10-15 19:43:39 +03:00
.eslintrc.json add dive, fix eslint 2023-10-15 19:43:39 +03:00
.gitignore add screen component 2023-10-10 20:56:37 +03:00
.npmignore fix package.json 2021-02-27 22:28:08 +00:00
.npmrc a few fixes (#20) 2023-09-19 03:18:01 +03:00
config.json feat(experimental): add maps provider 2023-10-27 20:37:09 +03:00
CONTRIBUTING.md add contributing, speed start, cleanup esbuild 2023-09-17 22:03:26 +03:00
cypress.json fix cypress schema 2023-09-17 22:03:43 +03:00
Dockerfile Added docker support, made config dynamic (#108) 2021-03-21 17:14:14 +01:00
esbuild.mjs display output size on build 2023-10-07 11:15:57 +03:00
index.html fix(ios): sometimes window dimensions dind't update properly after orientation change in standalone mode 2023-10-24 17:41:17 +03:00
LICENSE Initial commit 2021-02-27 22:27:59 +01:00
package.json main menu tooltip fixes 2023-10-28 02:39:45 +03:00
pnpm-lock.yaml fix: correctly set level name and allowCommands (always allow cheats) 2023-11-01 02:11:03 +03:00
pnpm-workspace.yaml feat: signs rendering support! 2023-10-07 11:17:29 +03:00
README.MD add playgrounds link 2023-10-10 21:09:23 +03:00
screenshot.png [ImgBot] Optimize images (#348) 2023-07-22 14:55:20 +02:00
server.js server(dev): always use only one source of textures 2023-10-07 11:19:07 +03:00
tsconfig.json enable strict null types which improves quality of codebase a lot! 2023-11-01 03:07:07 +03:00
vercel.json disable silent 2023-09-04 11:48:39 +03:00

Minecraft Web Client

A true Minecraft client running in your browser! A port of the original game to the web, written in JavaScript using modern web technologies.

This project is a work in progress, but I consider it to be usable. If you encounter any bugs or usability issues, please report them!

Big Features

  • Connect to any offline server* (it's possible because of proxy servers, see below)
  • Open any zip world file or even folder in read-write mode!
  • Singleplayer mode with simple world generation
  • Works offline
  • Play with friends over global network! (P2P is powered by Peer.js servers)
  • First-class touch (mobile) & controller support
  • Resource pack support
  • even even more!

There are a lot

World Loading

Zip files and folders are supported. Just drag and drop them into the browser window. You can open folders in readonly and read-write mode. New chunks may be generated incorrectly for now. In case of opening zip files they are stored in your ram entirely, so there is a ~300mb file limit on IOS. Whatever offline mode you used (zip, folder, just single player), you can always export world with the /export command typed in the game chat.

Servers

You can play almost on any server, supporting offline connections. See the Mineflayer repo for the list of supported versions (should support majority of versions). There is a builtin proxy, but you can also host a your one! Just clone the repo, run pnpm i (following CONTRIBUTING.MD) and run pnpm prod-start, then you can specify http://localhost:8080 in the proxy field. MS account authentication will be supported soon.

Things that are not planned yet

  • Mods, plugins (basically JARs) support, shaders - since they all are related to specific game pipelines

Advanced Settings

There are many many settings, that are not exposed in the UI yet. You can find or change them by opening the browser console and typing options. You can also change them by typing options.<setting_name> = <value>.

Console

To open the console, press F12, or if you are on mobile, you can type #debug in the URL (browser address bar), it wont't reload the page, but you will see a button to open the console. This way you can change advanced settings and see all errors or warnings. Also this way you can access global variables (described below).

Debugging

It should be easy to build/start the project locally. See CONTRIBUTING.MD for more info.

There is storybook for fast UI development. Run pnpm storybook to start it. There is world renderer playground (link).

However, there are many things that can be done in online version. You can access some global variables in the console and useful examples:

  • localStorage.debug = '*' - Enables all debug messages!

  • bot - Mineflayer bot instance. See Mineflayer documentation for more.

  • viewer - Three.js viewer instance, basically does all the rendering.

  • viewer.world.sectionObjects - Object with all active chunk sections (geometries) in the world. Each chunk section is a Three.js mesh or group.

  • localServer - Only for singleplayer mode/host. Flying Squid server instance, see it's documentation for more.

  • localServer.overworld.storageProvider.regions - See ALL LOADED region files with all raw data.

  • nbt.simplify(someNbt) - Simplifies nbt data, so it's easier to read.

You can also drag and drop any .dat file into the browser window to see it's contents in the console.

F3 Keybindings

  • F3 - Toggle debug overlay
  • F3 + A - Reload all chunks (these that are loaded from the server)
  • F3 + G - Toggle chunk sections (geometries) border visibility (aka Three.js geometry helpers) - most probably need to reload chunks after toggling

Notable Things that Power this Project