Skip to content

Commit 02049f8

Browse files
authored
Release (#526)
2 parents b6e8b0e + 2a6d724 commit 02049f8

41 files changed

Lines changed: 1468 additions & 1167 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
cp -r dist package/
3333
cd package
3434
zip -r ../self-host.zip .
35-
- run: pnpm build-playground
3635
# - run: pnpm build-storybook
3736
- run: pnpm test-unit
3837
- run: pnpm lint

.github/workflows/next-deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
env:
3838
CONFIG_JSON_SOURCE: BUNDLED
3939
LOCAL_CONFIG_FILE: config.mcraft-only.json
40-
- name: Copy playground files
41-
run: |
42-
mkdir -p .vercel/output/static/playground
43-
pnpm build-playground
44-
cp -r renderer/dist/* .vercel/output/static/playground/
40+
# - name: Copy playground files
41+
# run: |
42+
# mkdir -p .vercel/output/static/playground
43+
# pnpm build-playground
44+
# cp -r renderer/dist/* .vercel/output/static/playground/
4545
- name: Deploy Project Artifacts to Vercel
4646
uses: mathiasvr/command-output@v2.0.0
4747
with:

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ jobs:
3535
env:
3636
CONFIG_JSON_SOURCE: BUNDLED
3737
LOCAL_CONFIG_FILE: config.mcraft-only.json
38-
- name: Copy playground files
39-
run: |
40-
mkdir -p .vercel/output/static/playground
41-
pnpm build-playground
42-
cp -r renderer/dist/* .vercel/output/static/playground/
4338

4439
# publish to github
4540
- run: cp vercel.json .vercel/output/static/vercel.json

README.MD

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Don't confuse this with [Eaglercraft](https://eagsrc.webmc.xyz) which is a REAL
1818
1919
For building the project yourself / contributing, see [Development, Debugging & Contributing](#development-debugging--contributing). For reference at what and how web technologies / frameworks are used, see [TECH.md](./TECH.md) (also for comparison with Eaglercraft).
2020

21-
> **Note**: You can deploy it on your own server in less than a minute using a one-liner script from the [Minecraft Everywhere repo](https://github.com/zardoy/minecraft-everywhere).
21+
> **Note**: See [Self-hosting & proxy](#servers--proxy) for Docker, proxy-only setups, and a one-liner VPS script with [Minecraft Everywhere](https://github.com/zardoy/minecraft-everywhere).
2222
2323
### Big Features
2424

@@ -78,15 +78,9 @@ Whatever offline mode you used (zip, folder, just singleplayer), you can always
7878

7979
### Servers & Proxy
8080

81-
You can play almost on any Java server, vanilla servers are fully supported.
82-
See the [Mineflayer](https://github.com/PrismarineJS/mineflayer) repo for the list of supported versions (should support majority of versions).
83-
There is a built-in proxy, but you can also host your own! Just clone the repo, run `pnpm i` (see CONTRIBUTING.MD) and run `pnpm prod-start`, then you can specify `http://localhost:8080` in the proxy field. You can also deploy it to a cloud service:
81+
You can play on almost any Java server; vanilla servers are fully supported. See the [Mineflayer](https://github.com/PrismarineJS/mineflayer) repo for supported protocol versions.
8482

85-
[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=minecraft-web-client&type=git&repository=zardoy%2Fminecraft-web-client&branch=next&builder=dockerfile&env%5B%5D=&ports=8080%3Bhttp%3B%2F)
86-
87-
> **Note**: If you want to make **your own** Minecraft server accessible to web clients (without our proxies), you can use [mwc-proxy](https://github.com/zardoy/mwc-proxy) - a lightweight JS WebSocket proxy that runs on the same server as your Minecraft server, allowing players to connect directly via `wss://play.example.com`. `?client_mcraft` is added to the URL, so the proxy will know that it's this client.
88-
89-
Proxy servers are used to connect to Minecraft servers that use the TCP protocol. When you connect to a server with a proxy, a WebSocket connection is created between you (browser client) and the proxy server; then the proxy connects to the Minecraft server and sends the data to the client (you) without any packet deserialization to avoid additional delays. That said all Minecraft protocol packets are processed by the client, right in your browser.
83+
**How it works:** browsers speak WebSockets; Minecraft Java uses TCP. A **proxy** bridges the two. When you connect with a proxy URL enabled, your browser talks to the proxy over WebSocket **using the proxy's IP**; the proxy opens a TCP connection to the Minecraft server and forwards bytes without deserializing packets. All protocol handling still runs in the browser (Mineflayer in the client).
9084

9185
```mermaid
9286
graph LR
@@ -101,12 +95,29 @@ So if the server is located in Europe and you are connecting from Europe, you wi
10195

10296
Again, the proxy server is not a part of the client, it is a separate service that you can host yourself.
10397

104-
### Docker Files
98+
#### Self-hosting
99+
100+
| What you want | What to run |
101+
|---------------|-------------|
102+
| **Full stack** (your own full game copy + bundled proxy) | This repo: local dev with `pnpm i` and `pnpm prod-start` (see [CONTRIBUTING.md](./CONTRIBUTING.md)), or **Docker** with the [main Dockerfile](./Dockerfile) below. |
103+
| **Proxy only** (keep using a public game client e.g. [mcraft.fun](https://mcraft.fun)) | Run **[mwc-proxy](https://github.com/zardoy/mwc-proxy)** somewhere that can reach your Minecraft server (often same host/VPC); follow that README for the rest. **Where to host:** your own PC or home network often behaves better than a cloud relay—some servers flag datacenter IPs like “VPN” traffic; for casual play, any reachable host is fine. **URL in the client:** paste your relay’s URL into the **proxy** field; you still have to make it reachable (reverse proxy **with SSL**, **[Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)**, temporary URL services like cloudflared are not recommended). **Note:** the Minecraft server sees **your relay’s public IP** on the TCP leg (the proxy → server connection). You do **not** need this web-client repo for proxy-only. |
104+
| **One-liner deploy on a VPS** | [Minecraft Everywhere](https://github.com/zardoy/minecraft-everywhere) provides a **one-liner** script that can deploy these variants (your own full game copy, proxy, or combined setups)—pick what you need from that repo’s instructions. |
105+
106+
Public deployments (e.g. GitHub Pages) ship without your private TCP endpoint; for your own server you still point the client at **your** proxy (e.g. mwc-proxy or a stack you deployed with the script above).
107+
108+
**Koyeb (full app from this repo):**
109+
110+
[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?name=minecraft-web-client&type=git&repository=zardoy%2Fminecraft-web-client&branch=next&builder=dockerfile&env%5B%5D=&ports=8080%3Bhttp%3B%2F)
111+
112+
> **mwc-proxy vs this repo’s proxy:** [mwc-proxy](https://github.com/zardoy/mwc-proxy) is the lightweight standalone WebSocket→TCP bridge you run next to your world. This repo can embed a compatible proxy in `prod-start` / Docker. For “I only need a relay for the hosted client,” use mwc-proxy.
113+
114+
### Docker (self-hosted)
115+
116+
Use Docker when you want a reproducible install without local Node/pnpm setup (see [CONTRIBUTING.md](./CONTRIBUTING.md) only if you build from source).
105117

106-
- [Main Dockerfile](./Dockerfile) - for production build & offline/private usage. Includes full web-app + proxy server for connecting to Minecraft servers.
107-
- [Proxy Dockerfile](./Dockerfile.proxy) - for proxy server only - that one you would be able to specify in the proxy field on the client (`docker build . -f Dockerfile.proxy -t minecraft-web-proxy`)
118+
**[Dockerfile](./Dockerfile)** — production image: **your own full game copy (web client) + proxy** in one process. Good when you host the full stack yourself.
108119

109-
In case of using docker, you don't have to follow preparation steps from CONTRIBUTING.MD, like installing Node.js, pnpm, etc.
120+
For **proxy only**, use **[mwc-proxy](https://github.com/zardoy/mwc-proxy)** (including its Docker options) instead of maintaining a second image in this repo.
110121

111122
### Rendering
112123

assets/generic_91.png

-2.41 KB
Binary file not shown.

assets/generic_92.png

-2.45 KB
Binary file not shown.

assets/generic_93.png

-2.46 KB
Binary file not shown.

assets/generic_94.png

-2.48 KB
Binary file not shown.

assets/generic_95.png

-2.5 KB
Binary file not shown.

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"watch-mesher": "pnpm build-mesher -w",
3232
"run-playground": "run-p watch-mesher watch-other-workers watch-playground",
3333
"run-all": "run-p start run-playground",
34-
"build-playground": "rsbuild build --config renderer/rsbuild.config.ts",
3534
"watch-playground": "rsbuild dev --config renderer/rsbuild.config.ts",
3635
"update-git-deps": "tsx scripts/updateGitDeps.ts",
3736
"request-data": "tsx scripts/requestData.ts"
@@ -80,14 +79,15 @@
8079
"esbuild-plugin-polyfill-node": "^0.3.0",
8180
"express": "^4.18.2",
8281
"filesize": "^10.0.12",
83-
"flying-squid": "npm:@zardoy/flying-squid@^0.0.118",
82+
"flying-squid": "npm:@zardoy/flying-squid@^0.0.119",
8483
"framer-motion": "^12.9.2",
8584
"fs-extra": "^11.1.1",
8685
"google-drive-browserfs": "github:zardoy/browserfs#google-drive",
8786
"jszip": "^3.10.1",
8887
"lodash-es": "^4.17.21",
8988
"mcraft-fun-mineflayer": "^0.1.23",
90-
"minecraft-data": "3.103.0",
89+
"minecraft-data": "0.0.0",
90+
"minecraft-inventory": "^0.1.37",
9191
"minecraft-protocol": "github:PrismarineJS/node-minecraft-protocol#master",
9292
"mineflayer-item-map-downloader": "github:zardoy/mineflayer-item-map-downloader",
9393
"mojangson": "^2.0.4",
@@ -155,9 +155,8 @@
155155
"http-server": "^14.1.1",
156156
"https-browserify": "^1.0.0",
157157
"mc-assets": "^0.2.72",
158-
"minecraft-inventory-gui": "github:zardoy/minecraft-inventory-gui#next",
159-
"mineflayer": "github:zardoy/mineflayer#gen-the-master",
160-
"mineflayer-mouse": "^0.1.26",
158+
"mineflayer": "0.0.0",
159+
"mineflayer-mouse": "0.1.28",
161160
"npm-run-all": "^4.1.5",
162161
"os-browserify": "^0.3.0",
163162
"path-browserify": "^1.0.1",
@@ -205,7 +204,7 @@
205204
"diamond-square": "github:zardoy/diamond-square",
206205
"prismarine-block": "github:zardoy/prismarine-block#next-era",
207206
"prismarine-world": "github:zardoy/prismarine-world#next-era",
208-
"minecraft-data": "3.103.0",
207+
"minecraft-data": "3.106.0",
209208
"prismarine-provider-anvil": "github:zardoy/prismarine-provider-anvil#everything",
210209
"prismarine-physics": "github:zardoy/prismarine-physics",
211210
"minecraft-protocol": "github:PrismarineJS/node-minecraft-protocol#master",
@@ -222,7 +221,7 @@
222221
"patchedDependencies": {
223222
"pixelarticons@1.8.1": "patches/pixelarticons@1.8.1.patch",
224223
"mineflayer-item-map-downloader@1.2.0": "patches/mineflayer-item-map-downloader@1.2.0.patch",
225-
"minecraft-protocol": "patches/minecraft-protocol.patch"
224+
"minecraft-protocol": "patches/minecraft-protocol@1.66.0.patch"
226225
},
227226
"ignoredBuiltDependencies": [
228227
"canvas",

0 commit comments

Comments
 (0)