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 server scripts get, see docs/modding/
|
||||
// what server phases get, see docs/modding/
|
||||
import type {
|
||||
EventSignal,
|
||||
Face,
|
||||
@@ -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 cubi/shared
|
||||
// placing and neighbor rules are in shared phases, see BlockRules in cubi/shared
|
||||
}
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
@@ -638,7 +638,7 @@ export interface TankHandlerOptions {
|
||||
set(tanks: FluidStack[]): void;
|
||||
}
|
||||
|
||||
// ctx.fluids in server scripts: FluidApi, and fluid handlers
|
||||
// ctx.fluids in server phases: FluidApi, and fluid handlers
|
||||
export interface ServerFluidApi extends FluidApi {
|
||||
// the handler of the block at x y z reached from face, from the first of its components with one, like
|
||||
// level.getCapability(Capabilities.FluidHandler.BLOCK, pos, side). undefined for a block without one there
|
||||
@@ -660,7 +660,7 @@ export interface ServerFluidApi extends FluidApi {
|
||||
interact(player: Player, handler: FluidHandler): boolean;
|
||||
}
|
||||
|
||||
// find and all read the recipes of types shared scripts registered
|
||||
// find and all read the recipes of types shared phases registered
|
||||
export interface RecipeApi extends RecipeLookup {
|
||||
// every recipe of a mod's own type, like "bworld:cooking", as its json. copies, in load order
|
||||
// deno-lint-ignore no-explicit-any
|
||||
@@ -817,7 +817,7 @@ export interface MenuRegistry {
|
||||
// adds slots to every player's own inventory menu, always there while they play, like the curios slots next to the
|
||||
// inventory. build runs when each player joins. only during setup
|
||||
extend_player_menu(build: (menu: PlayerMenuBuilder, player: Player) => void): void;
|
||||
// like registering a MenuType. the client script gives it a screen with ctx.ui.register_menu_screen
|
||||
// like registering a MenuType. the client phase gives it a screen with ctx.ui.register_menu_screen
|
||||
register<Args = undefined>(
|
||||
id: Id,
|
||||
build: (menu: MenuBuilder, args: Args, player: Player) => void,
|
||||
|
||||
Reference in New Issue
Block a user