Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / LootFunctionArgs

Interface: LootFunctionArgs โ€‹

Defined in: core/values/schema/vanilla.generated.ts:16

Each vanilla loot function's arguments, by id.

Properties โ€‹

apply_bonus โ€‹

apply_bonus: { formula: "ore_drops" | "minecraft:ore_drops"; } | object & object | object & object & object

Defined in: core/values/schema/vanilla.generated.ts:18

minecraft:apply_bonus.

Type Declaration โ€‹

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

enchantment โ€‹

readonly enchantment: string | Enchantment

formula โ€‹

readonly formula: ApplyBonusFormula


copy_components โ€‹

copy_components: object

Defined in: core/values/schema/vanilla.generated.ts:34

minecraft:copy_components (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

exclude? โ€‹

readonly optional exclude?: readonly (string | DataComponentType)[]

Defaults to none.

include? โ€‹

readonly optional include?: readonly (string | DataComponentType)[]

If omitted, all components present are included

source โ€‹

readonly source: "tool" | EntityTarget | "block_entity"


copy_custom_data โ€‹

copy_custom_data: object

Defined in: core/values/schema/vanilla.generated.ts:44

minecraft:copy_custom_data (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

ops โ€‹

readonly ops: readonly object[]

source โ€‹

readonly source: NbtProvider


copy_name โ€‹

copy_name: object

Defined in: core/values/schema/vanilla.generated.ts:55

minecraft:copy_name.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

source โ€‹

readonly source: "this" | "killer" | "direct_killer" | "killer_player" | "attacker" | "direct_attacker" | "attacking_player" | "target_entity" | "interacting_entity" | "block_entity" | "attacking_entity" | "last_damage_player"


copy_nbt โ€‹

copy_nbt: object

Defined in: core/values/schema/vanilla.generated.ts:61

minecraft:copy_nbt (before 1.20.5.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

ops โ€‹

readonly ops: readonly object[]

source โ€‹

readonly source: NbtProvider


copy_state โ€‹

copy_state: object

Defined in: core/values/schema/vanilla.generated.ts:72

minecraft:copy_state.

block โ€‹

readonly block: string

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

properties โ€‹

readonly properties: readonly unknown[]


discard โ€‹

discard: object

Defined in: core/values/schema/vanilla.generated.ts:79

minecraft:discard (1.21.11+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.


enchant_randomly โ€‹

enchant_randomly: object

Defined in: core/values/schema/vanilla.generated.ts:84

minecraft:enchant_randomly.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

enchantments? โ€‹

readonly optional enchantments?: readonly (string | Enchantment)[]

If omitted, all enchantments applicable to the item are possible (before 1.21.)

includeAdditionalCostComponent? โ€‹

readonly optional includeAdditionalCostComponent?: boolean

Whether to add additional_trade_cost component to the enchanted item. Additional cost value is determined by the enchantment level, with the formula 2 + random(0, 5 + level * 10) + 3 * level. Defaults to false. (26.1+.)

onlyCompatible? โ€‹

readonly optional onlyCompatible?: boolean

Whether to only enchant with item-compatible enchantments. Defaults to true. Note: Books are considered compatible with all Enchantments.

options? โ€‹

readonly optional options?: string | Enchantment | readonly (string | Enchantment)[]

The allowed enchantments. If omitted, all enchantments applicable to the item are possible.


enchant_with_levels โ€‹

enchant_with_levels: object

Defined in: core/values/schema/vanilla.generated.ts:97

minecraft:enchant_with_levels.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

includeAdditionalCostComponent? โ€‹

readonly optional includeAdditionalCostComponent?: boolean

Whether to add additional_trade_cost component to the enchanted item. Additional cost value is equal to the level cost determined by levels. Defaults to false. (26.1+.)

levels โ€‹

readonly levels: IntNumberProviderRef

The levels to enchant this item with.

options? โ€‹

readonly optional options?: string | Enchantment | readonly (string | Enchantment)[]

The allowed enchantments. If omitted, all enchantments applicable to the item are possible. (1.21+.)

treasure? โ€‹

readonly optional treasure?: boolean

Whether treasure enchantments are allowed on this item. (before 1.21.)


enchanted_count_increase โ€‹

enchanted_count_increase: object

Defined in: core/values/schema/vanilla.generated.ts:110

minecraft:enchanted_count_increase (1.21+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

count โ€‹

readonly count: FloatNumberProviderRef

Rounded after the number was multiplied by the looting level.

enchantment โ€‹

readonly enchantment: string | Enchantment

Enchantment that increases yields.

limit? โ€‹

readonly optional limit?: number

Limits the count of the item to a range.


exploration_map โ€‹

exploration_map: object

Defined in: core/values/schema/vanilla.generated.ts:121

minecraft:exploration_map.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

decoration? โ€‹

readonly optional decoration?: string

The icon used to mark the destination on the map.

destination? โ€‹

readonly optional destination?: string | Structure | readonly (string | Structure)[]

Generated structure to locate. Accepts any of the structure types used by the /locate command.

searchRadius? โ€‹

readonly optional searchRadius?: number

The size, in chunks, of the area to search for structures. The area checked is square, not circular. Radius 0 causes only the current chunk to be searched, radius 1 causes the current chunk and eight adjacent chunks to be searched, and so on. Defaults to 50.

skipExistingChunks? โ€‹

readonly optional skipExistingChunks?: boolean

Whether to not search in chunks that have already been generated. Defaults to true.

zoom? โ€‹

readonly optional zoom?: number

Defaults to 2.


explosion_decay โ€‹

explosion_decay: object

Defined in: core/values/schema/vanilla.generated.ts:136

minecraft:explosion_decay.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.


fill_player_head โ€‹

fill_player_head: object

Defined in: core/values/schema/vanilla.generated.ts:141

minecraft:fill_player_head.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

entity โ€‹

readonly entity: EntityTarget

this to use the entity that died or the player that gained the advancement, opened the container, or broke the block.


filtered โ€‹

filtered: object

Defined in: core/values/schema/vanilla.generated.ts:148

minecraft:filtered (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

itemFilter โ€‹

readonly itemFilter: ItemLike

Item predicate to select items to modify.

modifier โ€‹

readonly modifier: LootFunction | readonly LootFunction[]

Loot function to apply to the selected items. (before 1.21.11.)

onFail? โ€‹

readonly optional onFail?: LootFunction | readonly LootFunction[]

Loot function to apply to the item when item_filter fails. (1.21.11+.)

onPass? โ€‹

readonly optional onPass?: LootFunction | readonly LootFunction[]

Loot function to apply to the item when item_filter passes. (1.21.11+.)


furnace_smelt โ€‹

furnace_smelt: object

Defined in: core/values/schema/vanilla.generated.ts:161

minecraft:furnace_smelt.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.


limit_count โ€‹

limit_count: object

Defined in: core/values/schema/vanilla.generated.ts:166

minecraft:limit_count.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

limit โ€‹

readonly limit: IntRange | { max?: IntNumberProviderRef | undefined; min?: IntNumberProviderRef | undefined; }

Limits the count of the item to a range.


looting_enchant โ€‹

looting_enchant: object

Defined in: core/values/schema/vanilla.generated.ts:176

minecraft:looting_enchant (before 1.21.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

count โ€‹

readonly count: FloatNumberProviderRef

Rounded after the number was multiplied by the looting level.

limit? โ€‹

readonly optional limit?: number

Limits the count of the item to a range.


modify_contents โ€‹

modify_contents: object

Defined in: core/values/schema/vanilla.generated.ts:185

minecraft:modify_contents.

component โ€‹

readonly component: ContainerComponents

Describes target component's items to modify.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

modifier โ€‹

readonly modifier: LootFunction | readonly LootFunction[]

Applied to every item inside container.


reference โ€‹

reference: object

Defined in: core/values/schema/vanilla.generated.ts:194

minecraft:reference (before 26.3.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

name โ€‹

readonly name: string

Item modifier to reference.


sequence โ€‹

sequence: object

Defined in: core/values/schema/vanilla.generated.ts:201

minecraft:sequence (1.20.2+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes. (26.3+.)

functions โ€‹

readonly functions: LootFunction | readonly LootFunction[]

List of functions to apply to this item.


set_attributes โ€‹

set_attributes: object

Defined in: core/values/schema/vanilla.generated.ts:208

minecraft:set_attributes.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

modifiers โ€‹

readonly modifiers: readonly AttributeModifier[]

List of attribute modifiers to apply to this item.

replace? โ€‹

readonly optional replace?: boolean

Whether to replace existing attributes (otherwise append to existing). Defaults to true.


set_banner_pattern โ€‹

set_banner_pattern: object

Defined in: core/values/schema/vanilla.generated.ts:217

minecraft:set_banner_pattern.

append โ€‹

readonly append: boolean

Whether to add to the banner pattern list.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

patterns โ€‹

readonly patterns: readonly BannerPatternLayer[]

List of banner pattern layers.


set_book_cover โ€‹

set_book_cover: object

Defined in: core/values/schema/vanilla.generated.ts:226

minecraft:set_book_cover (1.20.5+.)

author? โ€‹

readonly optional author?: string

If omitted, the original author is kept (or an empty string is used if there was no component)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

generation? โ€‹

readonly optional generation?: number

If omitted, the original generation is kept (or 0 is used if there was no component)

title? โ€‹

readonly optional title?: string | { filtered?: string; raw: string; }

If omitted, the original title is kept (or an empty string is used if there was no component)

Union Members โ€‹

string


Type Literal โ€‹

{ filtered?: string; raw: string; }

filtered? โ€‹

readonly optional filtered?: string

Shown only to players with chat filtering enabled.

raw โ€‹

readonly raw: string


set_components โ€‹

set_components: object

Defined in: core/values/schema/vanilla.generated.ts:241

minecraft:set_components (1.20.5+.)

components โ€‹

readonly components: ItemLike

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.


set_contents โ€‹

set_contents: object

Defined in: core/values/schema/vanilla.generated.ts:247

minecraft:set_contents.

component โ€‹

readonly component: string

Describes target component to be filled with items.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

entries โ€‹

readonly entries: readonly LootEntry[]


set_count โ€‹

set_count: object

Defined in: core/values/schema/vanilla.generated.ts:255

minecraft:set_count.

add? โ€‹

readonly optional add?: boolean

Whether to add to the existing count. Defaults to false.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

count โ€‹

readonly count: IntNumberProviderRef


set_custom_data โ€‹

set_custom_data: object

Defined in: core/values/schema/vanilla.generated.ts:263

minecraft:set_custom_data (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

tag โ€‹

readonly tag: NbtInput


set_custom_model_data โ€‹

set_custom_model_data: object

Defined in: core/values/schema/vanilla.generated.ts:269

minecraft:set_custom_model_data (1.20.5+.)

colors? โ€‹

readonly optional colors?: ({ mode: "append" | "minecraft:append"; } | ({ mode: "insert" | "minecraft:insert"; } & { readonly offset?: number | undefined; }) | { mode: "replace_all" | "minecraft:replace_all"; } | ({ ...; } & { ...; })) & { ...; }

(1.21.4+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

flags? โ€‹

readonly optional flags?: ({ mode: "append" | "minecraft:append"; } | ({ mode: "insert" | "minecraft:insert"; } & { readonly offset?: number | undefined; }) | { mode: "replace_all" | "minecraft:replace_all"; } | ({ ...; } & { ...; })) & { ...; }

(1.21.4+.)

floats? โ€‹

readonly optional floats?: ({ mode: "append" | "minecraft:append"; } | ({ mode: "insert" | "minecraft:insert"; } & { readonly offset?: number | undefined; }) | { mode: "replace_all" | "minecraft:replace_all"; } | ({ ...; } & { ...; })) & { ...; }

(1.21.4+.)

strings? โ€‹

readonly optional strings?: ({ mode: "append" | "minecraft:append"; } | ({ mode: "insert" | "minecraft:insert"; } & { readonly offset?: number | undefined; }) | { mode: "replace_all" | "minecraft:replace_all"; } | ({ ...; } & { ...; })) & { ...; }

(1.21.4+.)

value โ€‹

readonly value: LegacyNumberProvider

Tag that describes the custom model an item will take. Used by the custom_model_data model overrides predicate. Has certain restrictions due to float conversion. (before 1.21.4.)


set_damage โ€‹

set_damage: object

Defined in: core/values/schema/vanilla.generated.ts:332

minecraft:set_damage.

add? โ€‹

readonly optional add?: boolean

Whether to add to the existing damage of the item. Defaults to false.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

damage โ€‹

readonly damage: FloatNumberProviderRef

Decimal percentage. Can be negative when used in combination with add. \ Accepts a value between -1 & 1 (inclusive).


set_enchantments โ€‹

set_enchantments: object

Defined in: core/values/schema/vanilla.generated.ts:341

minecraft:set_enchantments.

add? โ€‹

readonly optional add?: boolean

Whether to add to the level of each enchantment. Defaults to false.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

enchantments โ€‹

readonly enchantments: object

A map of enchantments to levels. Setting an enchantment to 0 removes it from the item.

Index Signature โ€‹

[key: string]: IntNumberProviderRef


set_firework_explosion โ€‹

set_firework_explosion: object

Defined in: core/values/schema/vanilla.generated.ts:350

minecraft:set_firework_explosion (1.20.5+.)

colors? โ€‹

readonly optional colors?: readonly number[]

If omitted, the original colors are kept (or [] is used if there was no component). Calculated as RED << 16 | GREEN << 8 | BLUE. Each of these fields must be between 0 and 255, inclusive.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

fadeColors? โ€‹

readonly optional fadeColors?: readonly number[]

If omitted, the original fade colors are kept (or [] is used if there was no component). Calculated as RED << 16 | GREEN << 8 | BLUE. Each of these fields must be between 0 and 255, inclusive.

shape? โ€‹

readonly optional shape?: FireworkShape

If omitted, the original shape is kept (or small_ball is used if there was no component).

trail? โ€‹

readonly optional trail?: boolean

If omitted, the original has_trail value is kept (or false is used if there was no component).

twinkle? โ€‹

readonly optional twinkle?: boolean

If omitted, the original has_twinkle value is kept (or false is used if there was no component).


set_fireworks โ€‹

set_fireworks: object

Defined in: core/values/schema/vanilla.generated.ts:365

minecraft:set_fireworks (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

explosions? โ€‹

readonly optional explosions?: ({ mode: "append" | "minecraft:append"; } | ({ mode: "insert" | "minecraft:insert"; } & { readonly offset?: number | undefined; }) | { mode: "replace_all" | "minecraft:replace_all"; } | ({ ...; } & { ...; })) & { ...; }

flightDuration? โ€‹

readonly optional flightDuration?: number

If omitted, the flight duration of the item is left untouched - or set to 0 if the component did not exist before.


set_instrument โ€‹

set_instrument: object

Defined in: core/values/schema/vanilla.generated.ts:385

minecraft:set_instrument.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

options โ€‹

readonly options: string | readonly string[]

Sets the instrument tag for a goat horn.


set_item โ€‹

set_item: object

Defined in: core/values/schema/vanilla.generated.ts:392

minecraft:set_item.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

item โ€‹

readonly item: string


set_loot_table โ€‹

set_loot_table: object

Defined in: core/values/schema/vanilla.generated.ts:398

minecraft:set_loot_table.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

lootTableId โ€‹

readonly lootTableId: string | LootTable

The loot table to set to the container block item. (26.3+.)

name โ€‹

readonly name: string | LootTable

The loot table to set to the container block item. (before 26.3.)

seed? โ€‹

readonly optional seed?: number

The container seed to use. Defaults to a random seed.

type โ€‹

readonly type: string

A block entity type. Unused by the game. \ The shortest word you can use is bed before 26.2, or bell in 26.2. (before 26.3.)


set_lore โ€‹

set_lore: { mode?: "append" | "minecraft:append"; } | object & object | { mode?: "replace_all" | "minecraft:replace_all"; } | object & object & object

Defined in: core/values/schema/vanilla.generated.ts:411

minecraft:set_lore.

Type Declaration โ€‹

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

entity? โ€‹

readonly optional entity?: EntityTarget | undefined

The entity used to resolve the text components.

lore โ€‹

readonly lore: readonly TextLike[]

mode? โ€‹

readonly optional mode?: boolean | ListOperationMode | undefined

Determines how the existing list should be modified.


set_name โ€‹

set_name: object

Defined in: core/values/schema/vanilla.generated.ts:429

minecraft:set_name.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

entity? โ€‹

readonly optional entity?: EntityTarget

Specifies the entity to act as the target @s in the JSON text component.

name โ€‹

readonly name: TextLike

target? โ€‹

readonly optional target?: SetNameTarget

Which name component to set. Defaults to custom_name. (1.20.5+.)


set_nbt โ€‹

set_nbt: object

Defined in: core/values/schema/vanilla.generated.ts:439

minecraft:set_nbt (before 1.20.5.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

tag โ€‹

readonly tag: NbtInput


set_ominous_bottle_amplifier โ€‹

set_ominous_bottle_amplifier: object

Defined in: core/values/schema/vanilla.generated.ts:445

minecraft:set_ominous_bottle_amplifier (1.20.5+.)

amplifier โ€‹

readonly amplifier: IntNumberProviderRef

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.


set_potion โ€‹

set_potion: object

Defined in: core/values/schema/vanilla.generated.ts:451

minecraft:set_potion.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

id โ€‹

readonly id: string | PotionType

The potion identifier.


set_random_dyes โ€‹

set_random_dyes: object

Defined in: core/values/schema/vanilla.generated.ts:458

minecraft:set_random_dyes (26.1+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

numberOfDyes โ€‹

readonly numberOfDyes: IntNumberProviderRef

Applies specified number of random dyes to the item. \ For example, one possible outcome of "number_of_dyes": 2 is #2C3065, which is the combination of a blue dye and a black dye. \ The same dye color can be selected multiple times.


set_random_potion โ€‹

set_random_potion: object

Defined in: core/values/schema/vanilla.generated.ts:465

minecraft:set_random_potion (26.1+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

options? โ€‹

readonly optional options?: string | PotionType | readonly (string | PotionType)[]

Possible potions to select from. Defaults to all potions.


set_stew_effect โ€‹

set_stew_effect: object

Defined in: core/values/schema/vanilla.generated.ts:472

minecraft:set_stew_effect.

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

effects? โ€‹

readonly optional effects?: readonly StewEffect[]

Sets the status effects for suspicious stew.


set_writable_book_pages โ€‹

set_writable_book_pages: { mode: "append" | "minecraft:append"; } | object & object | { mode: "replace_all" | "minecraft:replace_all"; } | object & object & object

Defined in: core/values/schema/vanilla.generated.ts:479

minecraft:set_writable_book_pages (1.20.5+.)

Type Declaration โ€‹

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

mode โ€‹

readonly mode: ListOperationMode

Determines how the existing list should be modified.

pages โ€‹

readonly pages: readonly (string | { filtered?: string; raw: string; })[]

Sets the pages of a book and quill.


set_written_book_pages โ€‹

set_written_book_pages: { mode: "append" | "minecraft:append"; } | object & object | { mode: "replace_all" | "minecraft:replace_all"; } | object & object & object

Defined in: core/values/schema/vanilla.generated.ts:500

minecraft:set_written_book_pages (1.20.5+.)

Type Declaration โ€‹

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

mode โ€‹

readonly mode: ListOperationMode

Determines how the existing list should be modified.

pages โ€‹

readonly pages: readonly TextLike | { readonly raw: TextLike; readonly filtered?: TextLike | undefined; }[]

Sets the pages of a written book.


toggle_tooltips โ€‹

toggle_tooltips: object

Defined in: core/values/schema/vanilla.generated.ts:521

minecraft:toggle_tooltips (1.20.5+.)

condition? โ€‹

readonly optional condition?: Predicate

Applies only when this passes.

toggles โ€‹

readonly toggles: object

Toggles which tooltips are shown.

Index Signature โ€‹

[key: string]: boolean

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.