Run the dev network
A proxy bundle needs a network to run in. The dev network is a complete one on your own machine: the same relay, proxy, servers and Minekube API as in production, on loopback ports. You program its proxy and play on it like on the dev server.
Start the network
Section titled “Start the network”mk server --network --accept-eulaThe dev network runs beside the dev server, on its own ports, and listens on 127.0.0.1 only:
| Part | Address | What it does |
|---|---|---|
| Relay | localhost:25577 |
Where players join. Passes them over iroh to the proxy. |
| Velocity | 127.0.0.1:25578 |
The proxy, with the Minekube plugin. Offline mode, modern forwarding. Runs in the foreground. |
lobby |
127.0.0.1:25580, RCON 25590 |
A Paper server labeled stage=lobby. Players land here. |
arena |
127.0.0.1:25581, RCON 25591 |
A Paper server labeled game=arena. |
| Minekube API | http://localhost:4776 |
Its registry knows every instance and its labels. Velocity finds lobby and arena by their labels through it. |
| Devtools | http://127.0.0.1:4774 |
The proxy’s and the servers’ sessions. |
Both Paper servers run the Minekube plugin, plus ViaVersion and ViaBackwards, so clients older than the servers can play too. They accept players only through the proxy. Stopping Velocity (end, or Ctrl-C) stops the whole network.
Install your proxy bundle
Section titled “Install your proxy bundle”In the project:
mk dev .mk dev builds the project’s velocity bundle (proxy/velocity.ts in a project from mk init) into the proxy’s plugins/ and reinstalls it on every save. A project with a paper bundle also gets its game installed on the dev server.
Join the network
Section titled “Join the network”Join localhost:25577 with Minecraft. You land on lobby; Velocity’s /server arena moves you, and /lobby brings you back. When you save, players see [proxy] Reloaded <id> (<revision>) in chat, and nobody disconnects. On the dev proxy every player counts as a developer and sees these messages; the runtime messages are those of a game, in the proxy’s log.
Related
Section titled “Related”- Proxy bundles: write the rules and the proxy half.
- Labels and selectors: how the proxy finds
lobbyandarena. - Connector, relay and API: what the relay and the Minekube API do.
Was this helpful?
Thanks for the feedback.