New modding system

This commit is contained in:
2026-09-26 17:33:07 -03:00
parent 86d5c39eab
commit 243ff52063
25 changed files with 1089 additions and 512 deletions
+3 -4
View File
@@ -1,13 +1,13 @@
// messages sent between the client and the server, as json over a websocket
import type { Faces } from "./constants.ts";
import type { ItemData } from "./inventory.ts";
import type { AtlasListing, ModListing } from "./mod_loader.ts";
import type { ModListing } from "./mod_loader.ts";
export const AIR_ID = "bworld:air";
// bump when a client and server of different versions can't play together.
// the server rejects a different version before the client downloads anything
export const PROTOCOL_VERSION = 3;
export const PROTOCOL_VERSION = 4;
export interface PlayerInfo {
id: string;
@@ -83,8 +83,7 @@ export type ServerMessage =
type: "welcome";
protocol: number;
seed: string;
atlas: AtlasListing;
// in load order, the client loads them before joining the world
// in load order, the client downloads and loads them before joining the world
mods: ModListing[];
}
// the connection is closed right after