Animation clips
This commit is contained in:
@@ -8,6 +8,7 @@ import type { ModelFileJson } from "./block_models.ts";
|
||||
import { MAX_ANIMATED_TEXTURE_SIZE, MAX_TEXTURE_SIZE } from "./constants.ts";
|
||||
import {
|
||||
type BlockJson,
|
||||
type ClipJson,
|
||||
type EffectJson,
|
||||
type EntityJson,
|
||||
type EntityModelJson,
|
||||
@@ -19,6 +20,7 @@ import {
|
||||
type SpawnJson,
|
||||
type TagJson,
|
||||
validate_block,
|
||||
validate_clip,
|
||||
validate_effect,
|
||||
validate_entity,
|
||||
validate_entity_model,
|
||||
@@ -189,6 +191,7 @@ export function read_mod(bytes: Uint8Array, file: string): Mod {
|
||||
validate_entity_model,
|
||||
problems,
|
||||
) as EntityModelJson[],
|
||||
animations: checked(raw_data.animations, "animations", validate_clip, problems) as ClipJson[],
|
||||
effects: checked(raw_data.effects, "effects", validate_effect, problems) as EffectJson[],
|
||||
fluids: checked(raw_data.fluids, "fluids", validate_fluid, problems) as FluidJson[],
|
||||
tags: checked(raw_data.tags, "tags", validate_tag, problems) as TagJson[],
|
||||
@@ -228,6 +231,7 @@ export function read_mod(bytes: Uint8Array, file: string): Mod {
|
||||
...data.items,
|
||||
...data.entities,
|
||||
...data.entity_models,
|
||||
...data.animations!,
|
||||
...data.effects,
|
||||
...data.fluids,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user