Item Meta
Introduction🔗
This is a continuation of the item type section, please read that first if you haven't.
Normal Meta🔗
These values will apply to every item that can be dropped. All values are optional.
| Value Name | Type | Description |
|---|---|---|
amount |
Whole number | The amount of items that will drop. See Number Providers for more info. |
max-amount |
Whole number | If amount is higher than this value, it will be set to this value. |
display-name |
Text | The name of the item, supports color codes. |
lore |
List of text | The lore of the item, supports color codes and multiple values. |
custom-model-data |
Whole number | The custom model data of an item. Used for resource packs. If you don't know what this is, you probably don't need it. |
unbreakable |
true or false |
Whether or not the item can take damage. Mainly only applies to items that can take damage. |
repair-cost |
Positive whole number | The cost in levels of the next repair in an anvil. Mainly only applies to items that can be repaired. |
durability |
A whole number or percentage | The durability of the item. Mainly only applies to items that have durability. Should not be included if min-durability and max-durability are used. |
min-durability and max-durability |
A whole number or percentage | Same as durability, must include both values. Should not be included if durability is used. |
hide-flags |
List of ItemFlag or true |
Allows hiding certain text in the item description. If set to true, all applicable item flags will be hidden. |
copy-block-state |
true or false |
Only applies to loot tables of type BLOCK. Allows copying the tile entity state of the block that was broken into the item. |
copy-block-data |
true or false |
Only applies to loot tables of type BLOCK. Allows copying the block data of the block that was broken into the item. |
copy-block-name |
true or false |
Only applies to loot tables of type BLOCK. Allows copying the name of the block container that was broken onto the item. |
smelt-if-burning |
true or false |
Only applies to loot tables of type ENTITY. Smelts the resulting item if the looted entity is on fire. |
loot-table |
The key of a loot table installed on your server, either through vanilla or a datapack | Only applies to items that are considered Lootable, such as containers or suspicious sand. |
restore-vanilla-attributes |
true or false |
Enabled by default, restores vanilla attributes to items on 1.21+. |
looter-pickup-only |
true or false |
If true, only the looting player will be able to pick up this item. |
Randomly Applied Enchantments🔗
An item can have random enchantments applied. The following is an example.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: diamond_sword
amount: 1
enchant-randomly:
level: 30
treasure: true
level value is the enchantment table equivalent of the enchantments that will be put onto the item. treasure determines if enchantments such as mending can be applied to the item.
Random Enchantment🔗
This differs from the above section as this only applies one or more enchantments with a randomly chosen level. To apply multiple enchantments, you can set random-enchantments-amount to something higher than 1, this value is optional. If you set random-enchantments: [] it will pick from every applicable enchantment for the item. Enchantments exclusive with others or enchantments that aren't applicable for the item being enchanted will not be applied.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: diamond_sword
amount: 1
random-enchantments:
- sharpness
- smite
- bane_of_arthropods
random-enchantments-amount: 1
Enchantments🔗
If you don't want random enchantments, you can specify the exact enchantments you want instead.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: diamond_sword
amount: 1
enchantments:
sharpness: 5
looting: 3
Remove Enchantments🔗
If you want to make certain enchantments not allowed on an item, you can specify them under the remove-enchantments list. For enchanted books, this will turn the item into a regular book if there are no remaining enchantments.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: book
enchant-randomly:
level: 30
treasure: true
remove-enchantments:
- mending
Enchantment Bonus🔗
If you want to increase the number of a specific item that can drop when using an enchantment such as looting, you can do that with this section.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: emerald
amount: 1
enchantment-bonus:
formula: uniform
enchantment: looting
bonus-per-level: 1
enchantment is which enchantment type will increase the drop chance. You can find a list of all enchantments here. formula determines which formula to use for calculating the item bonus. Valid formula values are uniform, binomial, and ore_drops. Information on each formula type and their individual options can be found below:
Enchantment Bonus Formulas
Uniform🔗
Requires a number parameter bonus-per-level which is the number of extra items possible per enchantment level.
Binomial🔗
Requires a number parameter bonus-per-level which is the number of extra items possible for each passing chance, and probability between 0 and 1 which is the chance of the adding the bonus-per-level items per enchantment level.
Ore Drops🔗
Requires no extra parameters. This is the formula used for vanilla ore drops. Extra items = amount * (max(0; random(0..Level + 2) - 1) + 1)
Amount Modifiers🔗
It is possible to alter the amount of items to drop based on a list of conditions. conditions is the list of conditions which function identically to how other condition fields work. value determines the amount of the modifier. add determines how the value should be applied to the original amount; if true the value will be added to the amount, and if false the amount will be set to the value. Below is the vanilla loot table for cocoa beans as an example:
type: BLOCK
overwrite-existing: items
conditions:
- 'block-type:cocoa'
pools:
0:
conditions: []
rolls: 1
bonus-rolls: 0
entries:
0:
conditions: []
items:
0:
type: item
item: cocoa_beans
amount: 1
amount-modifiers:
0:
conditions:
- 'block-data:age=2'
value: 3
add: false
Attribute Modifiers🔗
If you want to make the dropped items do some crazy stuff, you can add attribute modifiers to them. This is a fairly complex feature, so just be warned.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: diamond_sword
amount: 1
attributes:
0:
name: 'generic.max_health'
amount: 20
operation: add_number
slot: hand
name is the name of the attribute; valid names can be found here. amount is the value of the attribute. In the case of generic.max_health here, it is the amount of health to increase by. The value of 20 means 20 health, which is 10 additional hearts.
operation is a bit complicated to understand. The valid values are add_number, add_scalar, and multiply_scalar_1. add_number will add to the existing value. add_scalar will multiply all other modifiers by the amount. multiply_scalar_1 will add the base value multiplied by the amount specified.
slot determines when the attribute modifier will be applied. Valid values can be found here. If no slot is specified, it will apply for all slots.
NBT Data🔗
Custom NBT can be written to items by using the nbt option with a valid NBT string. Note: This requires the NBT API plugin to be installed.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
entries:
0:
items:
0:
type: item
item: emerald
nbt: '{MyCustomNBTValue:"A custom NBT value on an emerald!"}'
Axolotl Bucket Meta🔗
Applicable to axolotl_bucket items. variant allows changing what color of axolotl will spawn from the bucket. Valid values can be found here. copy-looted can be true or false, if it's true and the loot table type is ENTITY and the killed entity was an axolotl, the axolotl type will be copied into the bucket.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:axolotl'
pools:
0:
entries:
0:
items:
0:
type: item
item: axolotl_bucket
amount: 1
variant: blue
copy-looted: false
Banner Meta🔗
Applicable to all banner items. You may specify a list of patterns and provide the color and pattern (type) for each pattern. Valid colors can be found here and valid pattern types can be found here.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: white_banner
amount: 1
patterns:
0:
color: red
pattern: rhombus_middle
1:
color: blue
pattern: flower
Written Book Meta🔗
Applicable to writable_book items. You may specify the book title, author, pages (page content), and generation (how the book was created).
title and author are both text values that do not support color codes, pages is a text list that supports color codes, and generation values can be found here.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: written_book
amount: 1
title: 'Book of Mysteries'
author: 'A Lost Soul'
pages:
- '<r:0.5>The first page with super magical rainbow colored text!'
- 'The boring second page with default colored text.'
generation: tattered
Enchantment Storage Meta🔗
Applicable to enchanted_book items. Functions identically to applying enchantments to a normal item, except they will be added as enchantments stored in the enchanted book instead.
Firework Effect Meta🔗
Applicable to firework_star items. This is not for the actual firework items, just for the star.
flicker can be true or false and determines if the firework will flicker. trail can be true or false and determines if the firework particles will leave a trail behind them. shape determines the shape of the firework; valid types can be found here. colors is a list of colors that the particles will be, and it can contain color names or hex codes. fade-colors functions the same as colors, except it will be the color the particles fade to over their lifetime. A list of valid firework color names can be found here.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: firework_star
amount: 1
flicker: true
trail: true
shape: ball_large
colors:
- '#FF00FF'
- 'orange'
fade-colors:
- 'red'
- '#00FFFF'
Firework Meta🔗
Applicable to firework_rocket items. Determines what power and effects a firework rocket will have. The power value will determine how far up the firework flies; the normal craftable range is between 1 and 3, but higher values can be used. The firework-effects section functions identically to how it does in Firework Effect Meta, but is provided as a list.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: firework_rocket
amount: 1
power: 2
firework-effects:
0:
flicker: true
trail: true
type: large_ball
colors:
- '#FF00FF'
- 'orange'
fade-colors:
- 'red'
- '#00FFFF'
Knowledge Book Meta🔗
Applicable to knowledge_book items. Allows you to configure what recipes a knowledge book will unlock when used. You may provide a recipes list using the internal recipe IDs, or you may leave the value off entirely. If no recipes list is provided, the knowledge book will unlock all recipes.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: knowledge_book
amount: 1
recipes:
- 'beacon'
- 'bone_meal_from_bone_block'
- 'white_dye_from_lily_of_the_valley'
Leather Armor Meta🔗
Applicable to leather armor items (leather_helmet, leather_chestplate, leather_leggings, leather_boots). Allows the ability to color the armor using hex codes.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: leather_chestplate
amount: 1
color: '#C0FFEE'
Armor Trim Meta🔗
Applicable to any armor item that allows applying trims. Trim materials must be a TrimMaterial. Trim patterns must be a TrimPattern.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: netherite_chestplate
amount: 1
trim:
material: amethyst
pattern: silence
Potion Meta🔗
Applicable to potion, splash_potion, and lingering_potion items. This is by far the most complex item meta type, so be warned.
color determines the color of the potion; this must be a hex code. potion-type is the main effect of the potion; values can be found here. Note: Do not use any value names ending in _STRONG, they will not work. Use an upgraded value of true as seen below for level 2 potions.
upgraded can be true or false and determines if the potion has had glowstone added to it in a brewing stand; setting it to true makes it level 2. extended can be true or false and determines if the potion has had redstone added to it in a brewing stand; setting it to true makes it have a longer effect duration.
custom-effects allows you to configure additional effects for the potion. effect is the potion effect type. The effect is not the same as the previous potion-type and uses different values that can be found here. duration is the duration in ticks. amplifier is the level of the effect plus 1; if the amplifier is 1, the effect level will be 2.
ambient can be true or false; if true, the particles given off by this effect will be transparent. particles can be true or false; if false, no particles be will given off by this effect. icon can be true or false; if true, an icon for the effect will appear in the corner of the player's screen. overwrite can be true or false; if true, it will overwrite any existing effects of the same type on the player when applied.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: splash_potion
amount: 1
color: '#FF0000'
potion-type: instant_damage
upgraded: true
extended: false
custom-effects:
0:
effect: regeneration
duration: 100
amplifier: 1
ambient: false
particles: true
icon: true
overwrite: true
1:
effect: luck
duration: 100
amplifier: 0
ambient: true
particles: true
icon: true
overwrite: true
Player Head Meta🔗
Applicable to player_head items. Only one value out of all of the ones listed here can be used. If you use multiple, only one will be applied.
texture is the Base64 texture string for the head to use; you can find an example value here. owner can be a player UUID or name. hdb-id uses a head ID and will only work when the plugin HeadDatabase is installed. There are two additional values of copy-looted and copy-looter, both of which accept either true or false values; if true, they will copy the player's head for the looted entity (if a player) and looter (if a player) respectively. copy-looted only works for loot tables with a type of ENTITY.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: player_head
amount: 1
owner: '27f49f81-0a43-445b-8d82-246badecf358'
Suspicious Stew Meta🔗
Applicable to suspicious_stew items. This functions almost identically to the additional effects in the Potion Meta. If pick-random-effect is optionally set to true, it will pick a single random effect from the custom-effects list.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: suspicious_stew
amount: 1
pick-random-effect: false
custom-effects:
0:
effect: regeneration
duration: 100
amplifier: 1
ambient: false
particles: true
icon: true
overwrite: true
Tropical Fish Bucket Meta🔗
Applicable to tropical_fish_bucket items. body-color allows changing the body color of the fish; valid values can be found here. pattern-color allows changing the color of the pattern of the fish; the same values are allowed as body-color. pattern determines the pattern on the fish; valid values can be found here. The value of copy-looted can be true or false; if true and the loot table type is ENTITY and the looted entity is a tropical fish, the properties of the fish will be copied into the bucket.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: tropical_fish_bucket
amount: 1
body-color: white
pattern: stripey
pattern-color: orange
Bundle Meta🔗
Applicable to bundle items. As of 1.17, bundles now exist in the game and can be filled with pretty much anything, including other bundles. You can use a list of valid loot items as the contents of the bundle.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:pig'
pools:
0:
entries:
0:
items:
0:
type: item
item: bundle
amount: 1
display-name: '&dLoot Bag'
contents:
0:
type: item
item: diamond
amount:
min: 1
max: 3
1:
type: item
item: emerald
amount:
min: 1
max: 3
Exploration Map Meta🔗
Applicable to map items. destination determines what feature the map will navigate towards; valid values can be found here. scale allows the zoom of the map to be changed; valid values can be found here. search-radius determines how many chunks away from the loot generation location to check for a structure with the same type as the destination; must be whole number greater than or equal to 0. skip-known-structures determines if additional chunks can be generated to locate the desired destination type and can be true or false.
type: ENTITY
overwrite-existing: none
conditions:
- 'entity-type:villager'
pools:
0:
conditions: []
entries:
0:
conditions: []
items:
0:
type: item
item: map
destination: pillager_outpost
search-radius: 100
skip-known-structures: false
scale: farthest
amount: 1
Music Instrument Meta🔗
Applicable to goat_horn items. music-instrument allows setting the Music Instrument of the goat horn.