Sounds on the client

This commit is contained in:
2026-11-22 07:21:29 -03:00
parent f308ab52f1
commit 47934b272c
21 changed files with 1002 additions and 25 deletions
+6
View File
@@ -16,6 +16,7 @@ import {
type OreJson,
type RecipeJson,
SHARED_TAG_NAMESPACE,
type SoundJson,
type SpawnJson,
type TagJson,
type TagRegistry,
@@ -67,6 +68,8 @@ export interface LoadedMod {
entity_models: { file: string; json: EntityModelJson }[];
// clips, see ANIMATION.md
animations: { file: string; json: ClipJson }[];
// its sounds.json, see docs/modding/resources/sounds.md
sounds: { file: string; json: SoundJson }[];
effects: { file: string; json: EffectJson }[];
fluids: { file: string; json: FluidJson }[];
tags: { file: string; json: TagJson }[];
@@ -88,6 +91,8 @@ export interface LoadedMod {
texture_files: Map<string, string>;
// textures/<name>.json by texture id, for the textures that have one (see texture_animation.ts)
texture_json: Map<string, TextureJson>;
// absolute paths of its sounds/ files by path in sounds/ without .ogg, like jester/stomp_1
sound_files: Map<string, string>;
}
// what a mod's data files hold, as packed into its .cubi
@@ -102,6 +107,7 @@ export function mod_data(mod: LoadedMod): ModData {
entities: mod.entities.map((e) => e.json),
entity_models: mod.entity_models.map((m) => m.json),
animations: mod.animations.map((a) => a.json),
sounds: mod.sounds.map((s) => s.json),
effects: mod.effects.map((e) => e.json),
fluids: mod.fluids.map((f) => f.json),
tags: mod.tags.map((t) => t.json),