diff --git a/index.d.ts b/index.d.ts index fe15ac4..5b0c8c2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -24,6 +24,8 @@ declare module "bedrock-protocol" { } export interface ClientOptions extends Options { + // The username to connect to the server as + username: string, // The view distance in chunks viewDistance?: number, // Specifies which game edition to sign in as. Optional, but some servers verify this. diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index a6741ea..4176b65 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -18,11 +18,11 @@ function hasDumps (version) { let loop async function dump (version, force = true) { - const random = ((Math.random() * 100) | 0) - const port = 19130 + random + const random = (Math.random() * 1000) | 0 + const [port, v6] = [19132 + random, 19133 + random] console.log('Starting dump server', version) - const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port }) + const handle = await vanillaServer.startServerAndWait(version || CURRENT_VERSION, 1000 * 120, { 'server-port': port, 'server-portv6': v6 }) console.log('Started dump server', version) const client = new Client({