UNPKG

minecraft-bedrock-json-types

Version:

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

157 lines (156 loc) 3.96 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; 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[]; type BlendTransition = (number | { /** * Mapping of time since the animation was canceled, to the blend value at that time. A default key of time=0 to a blend value of 1.0 is provided if any other key is set and a blend value at time=0 hasn't already been set. */ [k: string]: number; }); /** * When blending a transition to another state, animate each euler axis through the shortest rotation, instead of by value. */ type BlendViaShortestPath = boolean; /** * Set to false to have the effect spawned in the world without being bound to an actor (by default an effect is bound to the actor). */ type BindToActor = false; /** * The name of a particle effect that should be played. */ type Effect = string; /** * The name of a locator on the actor where the effect should be located. */ type Locator = string; /** * A molang script that will be run when the particle emitter is initialized. */ type PreEffectScript = string; /** * The effects to be emitted. */ type ParticleEffects = ParticleEffects1[]; /** * The specification on when to transition to a new state. */ type Transitions = (AnimationSpecification | AnimationSpecification1); /** * The transition definition for. */ type Transition = Transitions[]; /** * The minecraft molang definition that results in a float. */ type MolangNumber = (string | number); /** * UNDOCUMENTED. */ type Molang1 = string; /** * Sets molang on data on entry. */ type OnEntry = Molang1[]; /** * UNDOCUMENTED. */ type Molang2 = string; /** * Sets molang on data on exit. */ type OnExit = Molang2[]; /** * The state to start with, if not specified state at position 0 in the array is used. */ type InitialState = string; /** * UNDOCUMENTED. */ export interface ResourceAnimationController { format_version: FormatVersion; animation_controllers: AnimationControllersSchema; } /** * The animation controllers schema for. */ interface AnimationControllersSchema { [k: string]: AAnimationController; } /** * A single animation controller. */ interface AAnimationController { states: States; initial_state?: InitialState; } /** * The states of this animation controller. */ interface States { [k: string]: AnimationState; } /** * Animation state. */ interface AnimationState { animations?: Animations; blend_transition?: BlendTransition; blend_via_shortest_path?: BlendViaShortestPath; particle_effects?: ParticleEffects; /** * Collection of sounds to trigger on entry to this animation state. */ sound_effects?: { /** * Valid sound effect names should be listed in the entity's resource_definition json file. */ effect: string; }[]; transitions?: Transition; variables?: { [k: string]: { input: MolangNumber; remap_curve?: RemapCurve; }; }; on_entry?: OnEntry; on_exit?: OnExit; } /** * A object specification on how to transition. */ interface AnimationSpecification1 { [k: string]: (Molang | number); } /** * UNDOCUMENTED: particle effects. */ interface ParticleEffects1 { bind_to_actor?: BindToActor; effect: Effect; locator?: Locator; pre_effect_script?: PreEffectScript; } interface RemapCurve { [k: string]: number; } export {};