UNPKG

minecraft-bedrock-json-types

Version:

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

106 lines (105 loc) 2.4 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; /** * The key definition of an animation to play, defined in the entity. */ type Animations1 = (AnimationSpecification | AnimationSpecification1); /** * A single string that specifies which animation there are. */ type AnimationSpecification = string; /** * Molang definition. */ type Molang = string; /** * The animations definition for. */ type Animations = Animations1[]; /** * The event or commands to execute. */ type Commands = (Commands1 & Commands2); type Commands1 = (Event | Command | Molang1); type Commands2 = string; /** * Events, commands or transitions to preform on entry of this state. */ type OnEntry = Commands[]; type Commands3 = (Commands1 & Commands2); /** * Events, commands or transitions to preform on exit of this state. */ type OnExit = Commands3[]; /** * The transition definition for. */ type Transition = Transition1[]; /** * The state to start with, if not specified state at position 0 in the array is used. */ type InitialState = string; /** * Animation controller for behaviors. */ export interface BehaviorAnimationController { format_version: FormatVersion; animation_controllers: AnimationControllers; } /** * The animation controllers schema for. */ interface AnimationControllers { [k: string]: AnimationController; } /** * A single animation controller. */ interface AnimationController { states: States; initial_state?: InitialState; } /** * The states of this animation controller. */ interface States { [k: string]: AnimationState; } /** * Animation state. */ interface AnimationState { animations?: Animations; on_entry?: OnEntry; on_exit?: OnExit; transitions?: Transition; } /** * A object specification on when to animate. */ interface AnimationSpecification1 { [k: string]: Molang; } interface Event { [k: string]: unknown; } interface Command { [k: string]: unknown; } interface Molang1 { [k: string]: unknown; } /** * A transition to another state. */ interface Transition1 { [k: string]: Molang; } export {};