Tooltip api

This commit is contained in:
2026-11-05 23:06:37 -03:00
parent 9bc8fd992a
commit 34f001285d
15 changed files with 264 additions and 81 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import { AIR_ID, PROTOCOL_VERSION } from "@/common/protocol.ts";
import { decode_level_chunk } from "@/common/chunk_streaming.ts";
import { CHUNK_AREA, CHUNK_SIZE, ID_MASK } from "@/common/constants.ts";
import type { SavedChunk, SavedChunks, WorldSave } from "@/server/game/saves.ts";
import { FluidRules } from "@/common/fluids.ts";
import { BlockRules } from "@/common/block_rules.ts";
import { collision_shape_at, covers_face, is_solid } from "@/common/block_shapes.ts";
import { tag_api } from "@/common/tags.ts";
@@ -259,7 +260,7 @@ export function client_of(game: GameServer, area: Area) {
components: (id) => structuredClone(info(id)!.components ?? {}),
solid: (id) => id !== AIR_ID && is_solid(info(id)!),
},
items: shared_items_api("bworld"),
items: shared_items_api("bworld", new FluidRules((_mod, _what, fn) => fn())),
// only its blocks are looked at here
fluids: { exists: () => false, same: () => false, register() {} },
recipes: { register() {}, list: () => [], register_type() {}, find: () => undefined, all: () => [] },