Sounds on shared and server

This commit is contained in:
2026-11-22 07:44:13 -03:00
parent 47934b272c
commit 8e587f6446
16 changed files with 386 additions and 30 deletions
+6
View File
@@ -190,6 +190,12 @@ export interface SharedContext {
// registers stops its mod loading once every shared phase has set up. see RecipeType
register_type<R, I>(type: Id, rules: RecipeType<R, I>): void;
} & RecipeLookup;
readonly sounds: {
// once at x y z, from a rule. on the server, for every player in range but the one whose break, place or click
// ran the rule, since their client ran it too and played it already. on a client, only there. throws for a
// sound no mod defines. see docs/modding/resources/sounds.md
play(sound: Id, x: number, y: number, z: number, options?: PlayOptions): void;
};
readonly components: {
// the rules of a block component, the same id the server phase registers the rest of it under
// deno-lint-ignore no-explicit-any