Implement tags !
This commit is contained in:
+4
-1
@@ -12,6 +12,7 @@ import {
|
||||
type ManifestJson,
|
||||
type OreJson,
|
||||
type RecipeJson,
|
||||
type TagJson,
|
||||
validate_block,
|
||||
validate_entity,
|
||||
validate_entity_model,
|
||||
@@ -20,6 +21,7 @@ import {
|
||||
validate_model,
|
||||
validate_ore,
|
||||
validate_recipe,
|
||||
validate_tag,
|
||||
} from "./mod_data.ts";
|
||||
import type { ModData } from "./mod_loader.ts";
|
||||
|
||||
@@ -53,7 +55,7 @@ export class BmodError extends Error {
|
||||
|
||||
// the zip's layout:
|
||||
// manifest.json the mod's manifest, with "scripts" and "credits" pointing into the zip
|
||||
// data.json every block, model, item, recipe, ore, entity and entity model
|
||||
// data.json every block, model, item, recipe, ore, entity, entity model and tag
|
||||
// scripts/<side>.js
|
||||
// textures/<name>.png the texture <mod id>:<name>
|
||||
// credits.md
|
||||
@@ -144,6 +146,7 @@ export function read_bmod(bytes: Uint8Array, file: string): Bmod {
|
||||
validate_entity_model,
|
||||
problems,
|
||||
) as EntityModelJson[],
|
||||
tags: checked(raw_data.tags, "tags", validate_tag, problems) as TagJson[],
|
||||
};
|
||||
// a mod only registers ids in its own namespace
|
||||
for (const { id } of [...data.blocks, ...data.models, ...data.items, ...data.entities, ...data.entity_models]) {
|
||||
|
||||
Reference in New Issue
Block a user