Animation clips
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
choice_ids,
|
||||
choice_list,
|
||||
choice_problems,
|
||||
ClipJson,
|
||||
EffectJson,
|
||||
EntityJson,
|
||||
EntityModelJson,
|
||||
@@ -59,6 +60,8 @@ export interface ModData {
|
||||
spawns: SpawnJson[];
|
||||
entities: EntityJson[];
|
||||
entity_models: EntityModelJson[];
|
||||
// clips, see ANIMATION.md. missing from mods packed before there were any
|
||||
animations?: ClipJson[];
|
||||
// status effects, see EffectJson
|
||||
effects: EffectJson[];
|
||||
// kinds of fluid, see FluidJson
|
||||
@@ -224,6 +227,9 @@ export function register_mod_data(mods: { id: string; data: ModData }[]): Recipe
|
||||
for (const model of data.entity_models) {
|
||||
EverythingRegistry.register<EntityModelJson>("entity_models", model.id, model);
|
||||
}
|
||||
for (const clip of data.animations ?? []) {
|
||||
EverythingRegistry.register<ClipJson>("animations", clip.id, clip);
|
||||
}
|
||||
for (const json of data.entities) {
|
||||
EverythingRegistry.register<EntityJson>("entities", json.id, json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user