Send chunks to players connected to server

This commit is contained in:
2026-09-28 11:14:40 -03:00
parent 677ad8115a
commit ded9a7e5d0
26 changed files with 920 additions and 357 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { AssetManager } from "./assets.ts";
import { Client } from "./client.ts";
import { InputManager } from "./input_manager.ts";
import { Connection } from "./network.ts";
import { Options } from "./options.ts";
import { connect, HandshakeError, is_trusted, join, remember_trust, ServerAddress } from "./handshake.ts";
import { build_atlas, engine_textures } from "./atlas.ts";
import { confirm_mods } from "./confirm_mods.ts";
@@ -143,7 +144,7 @@ async function join_server(address: ServerAddress, name: string, status: (text:
console.log(`Mods: ${welcome.mods.map((mod) => `${mod.id} ${mod.version}`).join(", ") || "none"}`);
status("Joining...");
const joined = await join(socket);
const joined = await join(socket, new Options().render_distance);
return new Connection(socket, welcome, joined);
} catch (e) {
socket.close();