UNPKG

minecraft-bedrock-json-types

Version:

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

166 lines (165 loc) 3.67 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 Give = (string | { item?: ItemIdentifier; quantity?: Quantity; functions?: Functions; choice?: Choice; }); type ItemIdentifier = string; type Quantity = (Amount | { min: Minimum; max: Maximum; }); type Amount = number; type Minimum = number; type Maximum = number; /** * A minecraft loot table condition. */ type Functions1 = ({ [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; } & { [k: string]: unknown; }); type Functions = Functions1[]; type Item = (string | { item?: ItemIdentifier1; price_multiplier?: PriceMultiplier; functions?: Functions; biomes?: Biomes; quantity?: Quantity1; }); type ItemIdentifier1 = string; type PriceMultiplier = number; /** * UNDOCUMENTED. */ type BiomeName = ("animal" | "beach" | "birch" | "cold" | "dark_oak" | "deep" | "desert" | "edge" | "extreme_hills" | "flower_forest" | "forest" | "frozen" | "hills" | "ice" | "ice_plains" | "jungle" | "lakes" | "lukewarm" | "mega" | "mesa" | "monster" | "mooshroom_island" | "mountain" | "mutated" | "nether" | "ocean" | "plains" | "plateau" | "river" | "roofed" | "savanna" | "shore" | "stone" | "swamp" | "taiga" | "the_end" | "warm"); /** * UNDOCUMENTED. */ type Biomes = BiomeName[]; type Quantity1 = (Amount1 | { min: Minimum1; max: Maximum1; }); type Amount1 = number; type Minimum1 = number; type Maximum1 = number; /** * UNDOCUMENTED. */ type Choice = Item[]; type Gives = Give[]; type Want = (string | { item?: ItemIdentifier2; quantity?: Quantity2; price_multiplier?: PriceMultiplier1; functions?: Functions; choice?: Choice1; }); type ItemIdentifier2 = string; type Quantity2 = (Amount2 | { min: Minimum2; max: Maximum2; }); type Amount2 = number; type Minimum2 = number; type Maximum2 = number; /** * UNDOCUMENTED. */ type PriceMultiplier1 = number; /** * UNDOCUMENTED. */ type Choice1 = Item[]; type Wants = Want[]; type TraderExperience = number; type MaximumUses = number; type Weight = number; type RewardExperience = boolean; type Trades1 = Trade[]; type TotalExperienceRequired = number; type NumberToSelect = number; /** * A collection of groups. */ type Groups = Group[]; /** * A collection of tiers. */ type Tiers = Tier[]; /** * UNDOCUMENTED. */ export interface Trades { format_version?: FormatVersion; tiers?: Tiers; } interface Tier { trades?: Trades1; total_exp_required?: TotalExperienceRequired; groups?: Groups; } interface Trade { gives: Gives; wants: Wants; trader_exp?: TraderExperience; max_uses?: MaximumUses; weight?: Weight; reward_exp?: RewardExperience; } interface Group { num_to_select?: NumberToSelect; trades?: Trades1; } export {};