Skip to content

@minecraft/server


@minecraft/server / MatchToolCondition

Class: MatchToolCondition ​

Defined in: @minecraft/server/index.d.ts:16071

Loot item condition that checks whether an appropriate tool was used to trigger the loot event. Can describe item type, count, durability, enchantments, or arrays of item tags to compare against.

Extends ​

Properties ​

count ​

readonly count: NumberRange

Defined in: @minecraft/server/index.d.ts:16079

Remarks ​

The stack size, or count, required for this condition to pass.


durability ​

readonly durability: NumberRange

Defined in: @minecraft/server/index.d.ts:16085

Remarks ​

The durability value required for this condition to pass.


enchantments ​

readonly enchantments: EnchantInfo[]

Defined in: @minecraft/server/index.d.ts:16091

Remarks ​

Array of enchantments required for this condition to pass.


itemName ​

readonly itemName: string

Defined in: @minecraft/server/index.d.ts:16098

Remarks ​

The name of the tool item required for this condition to pass.


itemTagsAll ​

readonly itemTagsAll: string[]

Defined in: @minecraft/server/index.d.ts:16105

Remarks ​

Array of item tags which ALL must be matched for this condition to pass.


itemTagsAny ​

readonly itemTagsAny: string[]

Defined in: @minecraft/server/index.d.ts:16112

Remarks ​

Array of item tags, from which at least 1 must be matched for this condition to pass.


itemTagsNone ​

readonly itemTagsNone: string[]

Defined in: @minecraft/server/index.d.ts:16119

Remarks ​

Array of item tags, from which exactly zero must match for this condition to pass.