UNPKG

minecraft-bedrock-json-types

Version:

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

175 lines (174 loc) 3.33 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. */ type Volume = (number | [] | [Minimum] | [Minimum, Maximum]); type Minimum = number; type Maximum = number; type Pitch = (number | [] | [Minimum1] | [Minimum1, Maximum1]); type Minimum1 = number; type Maximum1 = number; /** * A single sound event definition. */ type SoundEvent = (string | { volume?: Volume; sound: SoundEvent1; pitch?: Pitch; }); /** * The sound event described in sound_definitions.json */ type SoundEvent1 = string; /** * A single sound event definition. */ type SoundEvent2 = (string | { volume?: Volume; sound?: SoundEvent3; pitch?: Pitch; }); /** * The sound event described in sound_definitions.json */ type SoundEvent3 = string; type ASoundInteraction = string; type ASoundInteraction1 = string; /** * Sound definitions. */ export interface Sounds { block_sounds?: BlockSounds; entity_sounds?: EntitySounds; individual_event_sounds?: IndividualEventSounds; interactive_sounds?: InteractiveSounds; } /** * Block sound definitions. */ interface BlockSounds { [k: string]: BlockSound; } /** * A single block sound definition. */ interface BlockSound { volume?: Volume; pitch?: Pitch; events?: Events; } interface Events { [k: string]: SoundEvent; } /** * Entity sounds definitions. */ interface EntitySounds { defaults?: EntitySound; entities?: Entities; } /** * Entity sound definitions. */ interface EntitySound { volume?: Volume; pitch?: Pitch; events?: Events1; [k: string]: unknown; } interface Events1 { [k: string]: SoundEvent; } /** * Entities definitions. */ interface Entities { [k: string]: EntitySound; } /** * Individual event sounds definitions. */ interface IndividualEventSounds { events?: Events2; } /** * Events. */ interface Events2 { [k: string]: SoundEvent; } /** * Interactive sounds definitions. */ interface InteractiveSounds { block_sounds?: BlockSounds1; entity_sounds?: EntitySounds1; } /** * Block sound definitions. */ interface BlockSounds1 { [k: string]: BlockSound1; } /** * A single block sound definition. */ interface BlockSound1 { volume?: Volume; pitch?: Pitch; events?: Events3; } interface Events3 { [k: string]: SoundEvent2; } /** * Entity sound definitions. */ interface EntitySounds1 { defaults?: Defaults; entities?: EntitesSounds; } /** * Default sound definitions. */ interface Defaults { volume?: Volume; pitch?: Pitch; [k: string]: EntitySounds2; } interface EntitySounds2 { events?: EntityEvents; [k: string]: unknown; } interface EntityEvents { [k: string]: EntityEvent; } /** * A single entity event. */ interface EntityEvent { [k: string]: ASoundInteraction; } /** * Entities sound definitions. */ interface EntitesSounds { [k: string]: EntitySounds3; } interface EntitySounds3 { volume?: Volume; pitch?: Pitch; events?: EntityEvents1; [k: string]: unknown; } interface EntityEvents1 { [k: string]: EntityEvent1; } /** * A single entity event. */ interface EntityEvent1 { [k: string]: ASoundInteraction1; } export {};