Single module modding
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// what client scripts get, see docs/modding/gui/index.md
|
||||
// what client phases get, see docs/modding/gui/index.md
|
||||
import type {
|
||||
FluidApi,
|
||||
FluidVariant,
|
||||
@@ -66,7 +66,7 @@ export interface ClientContext {
|
||||
// read only, what this client sees
|
||||
world: {
|
||||
get_block(x: number, y: number, z: number): Id | undefined;
|
||||
// a field of the block's client data, what server scripts set with BlockRef.set_client_data, a copy.
|
||||
// a field of the block's client data, what server phases set with BlockRef.set_client_data, a copy.
|
||||
// undefined when it isn't set or the chunk isn't loaded
|
||||
get_client_data<T>(x: number, y: number, z: number, field: string): T | undefined;
|
||||
// the biome at a block and its season, like the server's. undefined when the chunk isn't loaded
|
||||
@@ -115,7 +115,7 @@ export interface ClientContext {
|
||||
table(id: Id): LootTableJson | undefined;
|
||||
};
|
||||
// every recipe as its json (see docs/modding/resources/recipes.md), including mods' own types, in load order. copies.
|
||||
// find and all read the recipes of types shared scripts registered
|
||||
// find and all read the recipes of types shared phases registered
|
||||
recipes: {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
list(type?: Id): any[];
|
||||
@@ -376,7 +376,7 @@ export interface HudRegistry {
|
||||
// a layer, drawn every frame in the order they're registered, mods in load order, like RegisterGuiLayersEvent's
|
||||
// registerAboveAll. only during setup. one that throws is removed, with the error in the console
|
||||
register(id: Id, layer: HudLayer): void;
|
||||
// a server script sent an overlay message (MessageOptions.overlay), for a layer to show
|
||||
// a mod's server phase sent an overlay message (MessageOptions.overlay), for a layer to show
|
||||
on_overlay_message(fn: (text: string) => void): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user