minecraft-bedrock-json-types
Version:
Typescript types for Minecraft Bedrock's add-on json configuration files.
99 lines (98 loc) • 2.27 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;
/**
* Whenever or not use legacy distance checking.
*/
type UseLegacyMaxDistance = boolean;
/**
* The category this sound belongs to, for the user to control the volume on.
*/
type SoundCategory = ("ambient" | "block" | "music" | "weather" | "ui" | "bucket" | "neutral" | "player" | "hostile" | "record" | "bottle");
/**
* UNDOCUMENTED: sounds.
*/
type Sounds1 = (SoundFilepathSchema | Sounds2);
/**
* The filepath to the sound, starts with `sounds/'.
*/
type SoundFilepathSchema = string;
/**
* UNDOCUMENTED.
*/
type Is3D = boolean;
/**
* The pitch of the audio, 1 is nomial.
*/
type Pitch = number;
/**
* The volume of the audio, 1 is nomial.
*/
type Volume = number;
/**
* If marked true then minecraft will stream the audio.
*/
type Stream = boolean;
/**
* UNDOCUMENTED: name.
*/
type Name = string;
/**
* UNDOCUMENTED.
*/
type Weight = number;
/**
* The collection of sounds minecraft can choice from.
*/
type Sounds = Sounds1[];
/**
* UNDOCUMENTED.
*/
type MaxDistance = (number | null);
/**
* UNDOCUMENTED.
*/
type MinDistance = (number | null);
/**
* UNDOCUMENTED: use legacy Maximum distance.
*/
type UseLegacyMaximumDistance = ("true" | "false");
/**
* The collection of sound definitions this resourcepack has defined.
*/
export interface SoundDefinitions {
format_version?: FormatVersion;
sound_definitions?: SoundDefinitions1;
__use_legacy_max_distance?: UseLegacyMaximumDistance;
}
/**
* UNDOCUMENTED: sound definitions.
*/
interface SoundDefinitions1 {
[k: string]: Sound;
}
interface Sound {
__use_legacy_max_distance?: UseLegacyMaxDistance;
category?: SoundCategory;
sounds: Sounds;
max_distance?: MaxDistance;
min_distance?: MinDistance;
}
/**
* A collection of sounds to choice from.
*/
interface Sounds2 {
is3D?: Is3D;
pitch?: Pitch;
volume?: Volume;
stream?: Stream;
name: Name;
weight?: Weight;
}
export {};