Implement main game as a mod
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { BlockRegistry } from "$/common/everything_registry.ts";
|
||||
import type { SpriteRegion } from "$/common/constants.ts";
|
||||
import type { OreJson } from "$/common/mod_data.ts";
|
||||
|
||||
// messages between the main thread and the chunk workers
|
||||
|
||||
@@ -11,6 +12,9 @@ export type ToChunkWorker =
|
||||
block_ids: Record<string, number>;
|
||||
textures_info: Record<string, SpriteRegion>;
|
||||
image: { width: number; height: number };
|
||||
// mods' worldgen scripts and ores, so generation matches the server
|
||||
worldgen_scripts: { mod: string; url: string }[];
|
||||
ores: OreJson[];
|
||||
}
|
||||
| { type: "generate"; chunk_x: number; chunk_z: number; seed: string }
|
||||
| { type: "mesh"; chunk_x: number; chunk_z: number; version: number; padded_chunk: Uint32Array };
|
||||
|
||||
Reference in New Issue
Block a user