Single module modding
This commit is contained in:
@@ -19,7 +19,7 @@ const out = Deno.args[1] ?? ".";
|
||||
const [center_x, center_z] = [Number(Deno.args[2] ?? 0), Number(Deno.args[3] ?? 0)];
|
||||
Deno.mkdirSync(out, { recursive: true });
|
||||
|
||||
// the base game, from mods/bworld: its data registered like the game does, and its worldgen script for trees and the
|
||||
// the base game, from mods/bworld: its data registered like the game does, and its worldgen phase for trees and the
|
||||
// rest of its features
|
||||
const bworld = (await load_and_check()).find((mod) => mod.id === "bworld")!;
|
||||
const jsons = <T>(list: { json: T }[]) => list.map((entry) => entry.json);
|
||||
@@ -50,7 +50,7 @@ const dimension = jsons(bworld.dimensions).find((json) => json.default)!;
|
||||
const shape = dimension_shape(dimension);
|
||||
const worldgen = await load_worldgen({
|
||||
mods: ["bworld"],
|
||||
scripts: [{ mod: "bworld", url: new URL("../mods/bworld/scripts/worldgen.ts", import.meta.url).href }],
|
||||
scripts: [{ mod: "bworld", url: new URL("../mods/bworld/scripts/main.ts", import.meta.url).href }],
|
||||
ores: [jsons(bworld.ores)],
|
||||
generator: dimension.generator,
|
||||
shape,
|
||||
|
||||
Reference in New Issue
Block a user