Change imports
This commit is contained in:
@@ -125,7 +125,7 @@ export interface VisualBlock {
|
||||
readonly z: number;
|
||||
// they stay the same for the visual's life, it's made again when they change
|
||||
readonly states: Readonly<Record<string, number>>;
|
||||
// a field of its client data now, a copy, see BlockRef.set_client_data in bworld/server
|
||||
// a field of its client data now, a copy, see BlockRef.set_client_data in cubi/server
|
||||
get_client_data<T>(field: string): T | undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// bworld/engine: engine access, for what the game api doesn't cover yet. a mod needs "engine_access": true and a
|
||||
// cubi/engine: engine access, for what the game api doesn't cover yet. a mod needs "engine_access": true and a
|
||||
// game_version within one minor version in its manifest. see docs/modding/misc/engine.md
|
||||
//
|
||||
// this is bundled into each mod that imports it, so it only imports types: the engine and hook are the game's own,
|
||||
@@ -21,8 +21,8 @@ export interface Engine {
|
||||
client: ReturnType<typeof client_engine>;
|
||||
}
|
||||
|
||||
const api = (globalThis as unknown as Record<string, EngineGlobal | undefined>)["__bworld_engine"];
|
||||
if (!api) throw new Error("bworld/engine only works in a mod's script, loaded by the game");
|
||||
const api = (globalThis as unknown as Record<string, EngineGlobal | undefined>)["__cubi_engine"];
|
||||
if (!api) throw new Error("cubi/engine only works in a mod's script, loaded by the game");
|
||||
api.check_access();
|
||||
|
||||
export const engine = api.engine as Engine;
|
||||
|
||||
@@ -118,7 +118,7 @@ export interface BlockComponent<P = any> {
|
||||
// particular when it's undefined, like neoforge's Capabilities.FluidHandler.BLOCK. undefined when it has none
|
||||
// there. see ServerFluidApi.block_handler
|
||||
fluid_handler?(block: BlockRef, params: P, face: Face | undefined): FluidHandler | undefined;
|
||||
// placing and neighbor rules are in shared scripts, see BlockRules in bworld/shared
|
||||
// placing and neighbor rules are in shared scripts, see BlockRules in cubi/shared
|
||||
}
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
|
||||
Reference in New Issue
Block a user