Fluid data

This commit is contained in:
2026-10-25 14:24:16 -03:00
parent 17d83acfc8
commit fc27771a92
12 changed files with 387 additions and 31 deletions
+15 -2
View File
@@ -2,10 +2,21 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// what client scripts get, see docs/modding/gui/index.md
import type { Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi } from "./shared.ts";
import type { FluidApi, Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi } from "./shared.ts";
import type { LootTableJson } from "../loot.ts";
export type { Id, ItemStack, KeyCode, ModInfo, Position, Season, TagApi, TagRegistry } from "./shared.ts";
export type {
FluidApi,
FluidVariant,
Id,
ItemStack,
KeyCode,
ModInfo,
Position,
Season,
TagApi,
TagRegistry,
} from "./shared.ts";
export interface ClientContext {
mod: ModInfo;
@@ -59,6 +70,8 @@ export interface ClientContext {
// whether it's solid like stone, like the server's ctx.blocks.solid
solid(id: Id): boolean;
};
// every fluid, named and colored by its rules, see docs/modding/resources/fluids.md
fluids: FluidApi;
// the mods' loot table files (see docs/modding/resources/loot_tables.md), to show what they give. tables server
// scripts make with ctx.loot.register_table aren't here
loot: {