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
@@ -24,6 +24,7 @@ import {
ModRecipeJson,
OreJson,
RecipeJson,
SoundJson,
SpawnJson,
stack_problems,
TagJson,
@@ -62,6 +63,8 @@ export interface ModData {
entity_models: EntityModelJson[];
// clips, see ANIMATION.md. missing from mods packed before there were any
animations?: ClipJson[];
// its sounds.json, see docs/modding/resources/sounds.md. the files are in the .cubi's sounds/
sounds?: SoundJson[];
// status effects, see EffectJson
effects: EffectJson[];
// kinds of fluid, see FluidJson
@@ -230,6 +233,9 @@ export function register_mod_data(mods: { id: string; data: ModData }[]): Recipe
for (const clip of data.animations ?? []) {
EverythingRegistry.register<ClipJson>("animations", clip.id, clip);
}
for (const json of data.sounds ?? []) {
EverythingRegistry.register<SoundJson>("sounds", json.id, json);
}
for (const json of data.entities) {
EverythingRegistry.register<EntityJson>("entities", json.id, json);
}