minecraft-bedrock-json-types
Version:
Typescript types for Minecraft Bedrock's add-on json configuration files.
190 lines (189 loc) • 3.25 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.
*/
/**
* Determines how many items, will be selected.
*/
type Rolls = (number | {
min: Minimum;
max: Maximum;
[]: unknown;
});
/**
* The minimum amount.
*/
type Minimum = number;
/**
* The maximum amount.
*/
type Maximum = number;
/**
* Whenever this pool item is an item or another table.
*/
type Type = ("loot_table" | "item" | "empty");
/**
* A minecraft loot table condition.
*/
type Condition = ({
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
});
/**
* Possible conditions that need to have been met before selecting this item.
*/
type Conditions = Condition[];
/**
* UNDOCUMENTED.
*/
type Type1 = ("item" | "empty" | "loot_table");
/**
* The amount of the item.
*/
type Count = number;
/**
* An item or loottable.
*/
type Name = string;
/**
* UNDOCUMENTED.
*/
type Weight = number;
/**
* UNDOCUMENTED.
*/
type Function = ({
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
} & {
[]: unknown;
});
/**
* UNDOCUMENTED.
*/
type Functions = Function[];
/**
* A collection of items where the system will choice one or more from.
*/
type Pools1 = ASinglePool[];
/**
* UNDOCUMENTED.
*/
type Quality = number;
/**
* The items specifiation of this pool.
*/
type Entries = Entry[];
/**
* UNDOCUMENTED.
*/
type BonusChance = number;
/**
* UNDOCUMENTED.
*/
type BonusRolls = number;
/**
* UNDOCUMENTED.
*/
type InitialRange = number;
/**
* UNDOCUMENTED.
*/
type BonusRolls1 = number;
/**
* A collection of items where the system will choice one or more from.
*/
type Pools = ASinglePool[];
/**
* UNDOCUMENTED.
*/
type Type2 = "minecraft:chest";
/**
* A minecraft loot table.
*/
export interface LootTable {
pools?: Pools;
type?: Type2;
}
interface ASinglePool {
rolls?: Rolls;
type?: Type;
conditions?: Conditions;
entries?: Entries;
tiers?: Tiers;
bonus_rolls?: BonusRolls1;
}
/**
* UNDOCUMENTED.
*/
interface Entry {
type: Type1;
count?: Count;
name?: Name;
weight?: Weight;
functions?: Functions;
pools?: Pools1;
quality?: Quality;
}
/**
* UNDOCUMENTED.
*/
interface Tiers {
bonus_chance?: BonusChance;
bonus_rolls?: BonusRolls;
initial_range?: InitialRange;
}
export {};