Wiki ArticleJava EditionInformation neededJava Edition upcomingData packs

Item modifier

Item modifiers (also known as loot modifiers) can be used to apply modifications to item stacks, such as adjusting the stack size or adding enchantments. They can be defined in datapacks as JSON files, or used in loot tables. The /item command also accepts item modifiers in SNBT format.

A single modification in item modifiers is called item function or loot function.

An item modifier is a single loot function or an array of loot functions to apply to the item. The root element of an item modifier can be either an [NBT Compound / JSON Object] JSON object or NBT compound tag, following the structure of a loot function below, or an [NBT List / JSON Array] JSON array or NBT list, containing multiple loot functions.

Complete article available

This cached Wiki page is unusually large, so it is loaded on demand to keep the initial page fast.