UNPKG

minecraft-bedrock-json-types

Version:

Typescript types for Minecraft Bedrock's add-on json configuration files.

288 lines (287 loc) 6.49 kB
/** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A version that tells minecraft what type of data format can be expected when reading this file. */ type FormatVersion = string; /** * A geometry item, must be defined in the entity. */ type GeometryReference = string; /** * A geometry array definition. */ type Geometries1 = GeometryReference[]; /** * A material item, must be defined in the entity. */ type Material = string; /** * A material array definition. */ type Materials1 = Material[]; /** * An texture item. */ type Texture1 = string; /** * Textures. */ type Texture = Texture1[]; /** * The value of red, between 0 and 1. */ type R = (ColorNumber | MolangColor); /** * A color definition as number, between 0 and 1. */ type ColorNumber = number; /** * A color definition in molang, between 0 and 1. */ type MolangColor = string; /** * The value of green, between 0 and 1. */ type G = (ColorNumber | MolangColor); /** * The value of blue, between 0 and 1. */ type B = (ColorNumber | MolangColor); /** * The value of alpha, between 0 and 1. */ type A = (ColorNumber | MolangColor); /** * Whenever or not to apply enviroment lighting to this object. */ type FilterLighting = boolean; /** * The model data to use. */ type Geometry = string; /** * Whenever or not to apply enviroment lighting to this object. */ type IgnoreLighting = boolean; /** * The value of red, between 0 and 1. */ type R1 = (ColorNumber | MolangColor); /** * The value of green, between 0 and 1. */ type G1 = (ColorNumber | MolangColor); /** * The value of blue, between 0 and 1. */ type B1 = (ColorNumber | MolangColor); /** * The value of alpha, between 0 and 1. */ type A1 = (ColorNumber | MolangColor); /** * The amount of light that blends into what is being rendered, lower values gives darker rendering, (1 = 100%). */ type LightColorMultiplier = (string | number); /** * The specification where to apply materials to. * * @minItems 1 */ type Materials2 = [Materials3, ...(Materials3)[]]; /** * The material to apply, or patterns using * as a wildcard. */ type Material1 = string; /** * The value of red, must result in a float between 0 and 1. */ type R2 = (ColorNumber | MolangColor); /** * The value of green, must result in a float between 0 and 1. */ type G2 = (ColorNumber | MolangColor); /** * The value of blue, must result in a float between 0 and 1. */ type B2 = (ColorNumber | MolangColor); /** * The value of alpha, must result in a float between 0 and 1. */ type A2 = (ColorNumber | MolangColor); /** * The value of red, between 0 and 1. */ type R3 = (ColorNumber | MolangColor); /** * The value of green, between 0 and 1. */ type G3 = (ColorNumber | MolangColor); /** * The value of blue, between 0 and 1. */ type B3 = (ColorNumber | MolangColor); /** * The value of alpha, between 0 and 1. */ type A3 = (ColorNumber | MolangColor); /** * Determines what part of the object to show or hide. * * @minItems 1 */ type PartVisibility = [PartVisibility1, ...(PartVisibility1)[]]; /** * Whenever or not to rebuild the animation matrices. */ type RebuildAnimationMatrices = boolean; /** * The texture to apply, multiple texture can be used as to create an overlay effect, a specific material is required though. * * @minItems 1 */ type Textures1 = [Textures2, ...(Textures2)[]]; /** * The texture definition to apply. */ type Textures2 = string; /** * The offset to apply the UV, this will cause the texture on the object to shift by said amount, can be molang. The value for how much to offset is usually specified between 0 and 1 * * @minItems 2 * @maxItems 2 */ type Offset = [Offset1, Offset1]; /** * The offset to apply on the texture, can be molang. */ type Offset1 = (string | number); /** * The scale to apply to the texture, this will cause texture to seem to grow and shrink if done per frame. * * @minItems 2 * @maxItems 2 */ type Scale = [Scale1, Scale1]; /** * The scale to apply on the texture, can be molang. */ type Scale1 = (string | number); /** * A collection of render controllers to apply. */ export interface RenderController { format_version?: FormatVersion; render_controllers?: RenderControllers; } /** * The collection of render controllers, each property is the identifier of a render controller. */ interface RenderControllers { [k: string]: RenderController1; } /** * A single render_controller. */ interface RenderController1 { arrays?: Arrays; color?: Color; filter_lighting?: FilterLighting; geometry: Geometry; ignore_lighting?: IgnoreLighting; is_hurt_color?: IsHurtColor; light_color_multiplier?: LightColorMultiplier; materials: Materials2; on_fire_color?: OnFireColor; overlay_color?: OverlayColor; part_visibility?: PartVisibility; rebuild_animation_matrices?: RebuildAnimationMatrices; textures?: Textures1; uv_anim?: UvAnim; } /** * A collection of definition of arrays. */ interface Arrays { geometries?: Geometries; materials?: Materials; textures?: Textures; } /** * A collection of Geometry array. */ interface Geometries { [k: string]: Geometries1; } /** * A collection of materials array. */ interface Materials { [k: string]: Materials1; } /** * A collection of texture array. */ interface Textures { [k: string]: Texture; } /** * The color to apply. */ interface Color { r?: R; g?: G; b?: B; a?: A; } /** * The color to overlay on the entity when hurt. */ interface IsHurtColor { r?: R1; g?: G1; b?: B1; a?: A1; } /** * The definitions of what material to apply to what set of bones, can be done through specific names, or patterns using * as a wildcard. */ interface Materials3 { [k: string]: Material1; } /** * The color that will be overlayed when the object is on fire. */ interface OnFireColor { r?: R2; g?: G2; b?: B2; a?: A2; } /** * The color to put over the object. */ interface OverlayColor { r?: R3; g?: G3; b?: B3; a?: A3; } /** * The object that describe different bone visibility. */ interface PartVisibility1 { [k: string]: (string | boolean | number); } /** * The UV animation to apply to the render texture. */ interface UvAnim { offset: Offset; scale: Scale; } export {};