minecraft-bedrock-json-types
Version:
Typescript types for Minecraft Bedrock's add-on json configuration files.
85 lines (84 loc) • 2.11 kB
TypeScript
/**
* 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 time in seconds this animation will last.
*/
type AnimationLength = number;
/**
* Whenever this animation should loop once it reaches the end, will only happen if the animation is still active.
*/
type Loop = boolean;
/**
* The event or commands to execute.
*/
type Commands = (Commands1 & Commands2);
type Commands1 = (Variable | MinecraftCommand | Molang | Event);
type Commands2 = string;
/**
* The event or commands to execute.
*/
type Commands3 = (Commands4 & Commands5);
type Commands4 = (Variable | MinecraftCommand | Molang | Event);
type Commands5 = string;
type CollectionTimelimeItems = Commands3[];
/**
* How does time pass when playing the animation. Defaults to `query.anim_time + query.delta_time` which means advance in seconds.
*/
type AnimationTimeUpdate = (string | number);
/**
* Animation for behavior for.
*/
export interface BehaviorAnimation {
format_version: FormatVersion;
animations: AnimationsSchema;
}
/**
* The animation specification.
*/
interface AnimationsSchema {
[k: string]: Animation;
}
/**
* A single animation definition for.
*/
interface Animation {
animation_length?: AnimationLength;
loop?: Loop;
timeline?: Timeline;
anim_time_update?: AnimationTimeUpdate;
}
/**
* A timeline specification, property names are timestamps.
*/
interface Timeline {
[k: string]: (Commands | CollectionTimelimeItems);
}
/**
* Sets the value to a molang variable.
*/
interface Variable {
[k: string]: unknown;
}
/**
* Executes a minecraft command.
*/
interface MinecraftCommand {
[k: string]: unknown;
}
interface Molang {
[k: string]: unknown;
}
/**
* An event to be called upon within the executing entity.
*/
interface Event {
[k: string]: unknown;
}
export {};