Validators using zod

This commit is contained in:
2026-10-25 12:41:46 -03:00
parent 31ae2973d7
commit 4fad43d9cc
24 changed files with 1242 additions and 1788 deletions
+1 -6
View File
@@ -7,9 +7,7 @@
import { type BlockRegistry, type BlockTextures, liquid_textures } from "./everything_registry.ts";
import { tint_without_biome } from "./worldgen/biome_colors.ts";
import { get_state_value } from "./utils.ts";
export type ModelFace = "top" | "bottom" | "north" | "south" | "west" | "east";
export const MODEL_FACES: ModelFace[] = ["top", "bottom", "north", "south", "west", "east"];
import { type DisplayContext, MODEL_FACES, type ModelFace } from "./mod_data.ts";
export interface ModelFaceJson {
// a texture variable like "#side", or a texture id
@@ -47,9 +45,6 @@ export interface DisplayTransform {
scale?: [number, number, number];
}
// where items are shown: in slots, held in first person, dropped, and on blocks with item_display
export const DISPLAY_CONTEXTS = ["gui", "firstperson_righthand", "ground", "fixed"] as const;
export type DisplayContext = typeof DISPLAY_CONTEXTS[number];
export type ModelDisplay = Partial<Record<DisplayContext, DisplayTransform>>;
// a model as a mod writes it in models/. it can start from a parent, like minecraft's: it gets the parent's elements