Java Edition:Any NBT on Any Item

Any NBT on Any Item Example Debug Stick - Cropped.png

Almost any NBT can be obtained on any item in the April Fools' version 23w13a_or_b (first upload and reupload).[note 1] Several votes in this version replace one item with another but keep the replaced item's NBT. This allows NBT to be transfered from one item type to another. NBT crafting is another vote in this version that allows the player to craft items with any custom NBT tags they desire. Combining NBT crafting with replacement votes allows nearly any NBT to be transferred onto any item.

This method is extremely powerful and allows for many discontinued features. Using spawn eggs with custom NBT allows nearly any entity with custom NBT to be spawned. Using the BlockStateTag and BlockEntityTag allows for nearly any individual block to be created. Using potions with custom NBT, any effect can be obtained. The player can specify any used or unused NBT on items. If the player downgrades certain items before operator restriction bugs were fixed, the player can run commands in their world using this method.

Item NBT is replaced with item components in 24w09a (1.20.5 snapshot). Updated NBT is converted into its corresponding components. Unused NBT is copied into the minecraft:custom_data component by the data fixer.

Replacement Methods

There are five methods to replace an item and have its NBT remain. An item replaced from replace_items, replace_items_with_bottle_of_void, replace_recipe_output, replace_loot_drop, or even gold replacements from the midas_touch vote will retain their NBT.

Item Selection

The source and target items for the replace_items, replace_items_with_bottle_of_void, replace_recipe_output, and replace_loot_drop votes are all chosen using the same method except the target for replace_items_with_bottle_of_void is always Bottle of Void (bottle_of_void). The midas_touch vote does not use a source and target item. The source and target items of the replace vote cannot be the same. These two items are chosen using different methods:

  • 90% of the time the source item will be a random item on the list of all items that have a picked up, used, or crafted statistic greater than one by any online player in the world. This rule is intended to help the replace vote actually have an effect by excluding items the players have not obtained yet. Negative statistics and offline players will not count for this list. Unobtainable item statistics are required to get the unobtainable items on the 90% odds list. The other 10% of the time it will be randomly chosen from the 1,287 items in 23w13a_or_b. Also, if no player has picked up, used, or crafted any item then the latter method will always be used.
  • The target item will be randomly chosen from 1,288 options. The target will either be one of the 1,287 items in 23w13a_or_b or the target could be Air (air not the air_block item with the same name). If the target is Air, all of the source item will be deleted from every players' inventory.

Vote Searching

It is rare to find a specific desired conversion at random, the probability depends on how many items are in players' statistics. If the player has few items in their statistics, the chances of finding the desired source item will be much higher. In multiplayer, a player can be added who only gets a single statistic. If that player is the only one online, then slightly over 90% of the time[note 2] the source item will be that only item they have a statistic of.

Replace recipe text before (top) and after (bottom) applying the A or B Unique Item Names resource pack

There are several items that cannot be distinguished by their English names within the text of the replacement vote. There are 17 "Smithing Template", 15 "Music Disc", 7 "Banner Pattern", and 2 "Air". Some other in game languages have these items named differently, for example, Catalan[note 3] has a different name for each banner pattern (but not for music discs). There is no default language that has no repeat strings for all music discs and banner patterns. A resource pack can be used to uniquely identify the music discs, banner patterns, and air. Even with the resource pack, smithing templates can not be uniquely named because unlike all other items they shared a translation ID; this issue was classified as a bug and fixed in 23w31a (1.20.2 snapshot) after 23w13a_or_b.[1] The A or B Unique Item Names resource pack created by bluecrab2 uniquely identifies all the items except the smithing templates by adding descriptions after the item names in parentheses.[note 4]

Replace Items Vote

The "Replace all <ITEM> with <ITEM> in player inventories" (replace_items) vote directly converts all of the specified source item in every players' inventory into the target item. The probability that a new vote will be this type is 1000/113008, which is approximately 0.885%.[note 5]

This works to convert any item into any other item in this version, while retaining the NBT. The replacement is only applied once, when it is approved. The items will remain in the same slot with the same count, also allowing for overstacked items.

Replace Items with Bottle of Void Vote

The "Replace all <ITEM> with Bottle of Void in player inventories" (replace_items_with_bottle_of_void) vote is similar to the replace items vote above except its resulting item will always be a Bottle of Void. The probability that a new vote will be this type is 500/113008, which is approximately 0.442%.[note 5] The Bottle of Void will vanish when loaded in later versions, therefore its NBT can only be preserved by doing another replacement using a different method here, replacing to an item that exists in later versions.

Replace Recipe Output Vote

The diamond pickaxe recipe being replaced with an end portal frame and gaining the {Damage:0} NBT

The "Replace recipe output <ITEM> with <ITEM>" (replace_recipe_output) vote replaces the source item output with the target in crafting grids, furnaces, blast furnaces, smokers, stonecutters, campfires, and smithing tables. Only certain crafting and smithing table recipes can result in NBT. The probability that a new vote will be this type is 1000/113008, which is approximately 0.885%.[note 5] The vote chooses its source and target item with the same process as the replace items vote described above. The vote remains active unless repealed or replaced with another replace recipe vote that has the same source item. There can only be one replace recipe vote from any source item. These votes do not chain. This means that if, for example, a bucket to egg and egg to clay vote were both actively applied, then crafting a bucket would only make an egg, not clay.

A list of all recipes that result in NBT is below. The recipes can copy NBT from an ingredient to the output item and/or create new NBT that goes onto the output item. The NBT copying recipes will move any NBT onto the resulting item, even if that NBT was not intended to be on the item.

List of Recipes that Result in Items with NBT
Recipe Type Recipe Name Result Item(s) Resulting NBT
Crafting Armor Dye (crafting_special_armordye) Leather Armor
  • Adds color NBT (display:{color:<value>})
  • Copies all of the leather armor's NBT
Crafting Banner Duplicate (crafting_special_bannerduplicate) Any Color Banner
  • Copies all of the banner with a design's NBT
Crafting Book Cloning (crafting_special_bookcloning) Written Book
  • Adds or modifies generation NBT (generation:<value>) for original/copy/copy of copy
  • Copies all of the written book's NBT
Crafting Decorated Pot (crafting_decorated_pot) Decorated Pot
Crafting Dupehack (crafting_special_dupehack) Any Item
  • Copies the duplicated item's NBT
Crafting Firework Rocket (crafting_special_firework_rocket) Firework Rocket
  • Copies the firework star explosion NBT (Explosions:<value>) to inside the Fireworks NBT (Fireworks:{Explosions:<value>})
  • Adds flight duration NBT (Fireworks:{Flight:<value>})
Crafting Firework Star (crafting_special_firework_star) Firework Star
  • Adds explosion NBT (Explosion:{Type:<value>, Colors:<value>, Flicker:<value>, Trail:<value>})
Crafting Firework Star Fade (crafting_special_firework_star_fade) Firework Star
  • Adds fade color NBT (Explosion:{FadeColors: <value>})
  • Copies all of the firework star's NBT
Crafting Map Cloning (crafting_special_mapcloning) Filled Map
  • Copies all of the filled map's NBT
Crafting Map Extending (crafting_special_mapextending) Filled Map
  • Copies all of the filled map's NBT but modifies map number NBT (map:<value>)
Crafting Repair Item (crafting_special_repairitem) Any Tool
  • Adds durability (Damage:<value>) NBT
Crafting Craft Tool Any Tool
  • Adds no damage durability NBT (Damage:0), automatically without a special recipe
Crafting Shield Decoration (crafting_special_shielddecoration) Shield
  • Copies all of the shield's NBT
  • Copies all of banner's BlockEntityTag:<value> NBT (including patterns)
Crafting Shulker Box Coloring (crafting_special_shulkerboxcoloring) Any Color Shulker Box
  • Copies all of the shulker box's NBT
Crafting Suspicious Stew (crafting_special_suspiciousstew) Suspicious Stew
  • Adds effect NBT (Effects:<value>)
Crafting Tipped Arrow (crafting_special_tippedarrow) Tipped Arrow
  • Adds potion effect NBT (Potion:<value>)
Crafting NBT Crafting Recipe (nbt_crafting_recipe) Tag Items
Smithing Table Smithing Trim (smithing_trim) Any Armor Piece
  • Adds trim NBT (Trim:{material:<value>, pattern:<value>})
  • Copies all of the armor's NBT
Smithing Table Smithing Transform (smithing_transform) Netherite Armor
  • Copies all of the armor's NBT
A stray's slowness tipped arrow being replaced by a barrier, that retains the potion NBT.

Replace Loot Drop Vote

The "Replace loot drop <ITEM> with <ITEM>" (replace_loot_drop) vote will replace the specified source item from any loot with the target item. The loot can be from archaeology, block drops, entity drops, bartering, fishing, or villager gifts. Several vanilla loot tables give items with NBT, all of which can be put on any item with this vote. The probability that a new vote will be this type is 1000/113008, which is approximately 0.885%.[note 5] The vote remains active unless repealed or replaced with another replace loot vote that has the same source item. There can only be one replace recipe vote from any source item. These votes do not chain. This means that if, for example, a bucket to egg and egg to clay vote were both actively applied, then a bucket loot drop would drop an egg, not clay.

A list of vanilla loot tables resulting in items with NBT is below. The name of the NBT function is given for each resulting NBT except for tools, weapons, and armor that gain the damage 0 tag by default without any function.

List of Loot Tables that Give Items with NBT
Loot Table Item NBT Function Resulting NBT
archaeology/desert_well Suspicious Stew.png Suspicious Stew (suspicious_stew) set_stew_effect Effects:<value>
archaeology/ocean_ruin_cold Iron Axe 5.png Iron Axe (iron_axe) N/A (Equipment Durability) Damage:0
Wooden Hoe 3.png Wooden Hoe (wooden_hoe) N/A (Equipment Durability) Damage:0
archaeology/ocean_ruin_warm Iron Axe 5.png Iron Axe (iron_axe) N/A (Equipment Durability) Damage:0
Wooden Hoe 3.png Wooden Hoe (wooden_hoe) N/A (Equipment Durability) Damage:0
archaeology/trail_ruins Wooden Hoe 3.png Wooden Hoe (wooden_hoe) N/A (Equipment Durability) Damage:0
All Banner Loot Tables[note 6] Black Banner.pngBlue Banner.pngBrown Banner.pngCyan Banner.pngGray Banner.pngGreen Banner.pngLight Blue Banner.pngLight Gray Banner.pngLime Banner.pngMagenta Banner.pngOrange Banner.pngPink Banner.pngPurple Banner.pngRed Banner.pngWhite Banner.pngYellow Banner.png Respective Banner[note 7] copy_name display:{Name:<value>}
copy_nbt BlockEntityTag:{Patterns:<value>}
All Shulker Box Loot Tables[note 8] Shulker Box.pngBlack Shulker Box.pngBlue Shulker Box.pngBrown Shulker Box.pngCyan Shulker Box.pngGray Shulker Box.pngGreen Shulker Box.pngLight Blue Shulker Box.pngLight Gray Shulker Box.pngLime Shulker Box.pngMagenta Shulker Box.pngOrange Shulker Box.pngPink Shulker Box.pngPurple Shulker Box.pngRed Shulker Box.pngWhite Shulker Box.pngYellow Shulker Box.png Respective Shulker Box[note 9] copy_name display:{Name:<value>}
copy_nbt BlockEntityTag:{LootTable:<value>,LootTableSeed:<value>,id:"minecraft:shulker_box",Lock:<value>}
set_contents BlockEntityTag:{Items:<value>}
blocks/barrel Barrel.png Barrel (barrel) copy_name display:{Name:<value>}
blocks/beacon Beacon 6.png Beacon (beacon) copy_name display:{Name:<value>}
blocks/beehive Beehive.png Beehive (beehive) copy_nbt BlockEntityTag:{Bees:<value>}
copy_state BlockStateTag:{honey_level:<value>}
blocks/bee_nest Bee Nest.png Bee Nest (bee_nest copy_nbt BlockEntityTag:{Bees:<value>}
copy_state BlockStateTag:{honey_level:<value>}
blocks/blast_furnace Blast Furnace.png Blast Furnace (blast_furnace) copy_name display:{Name:<value>}
blocks/brewing_stand Brewing Stand (Item) 3.png Brewing Stand (brewing_stand) copy_name display:{Name:<value>}
blocks/chest Chest 2.png Chest (chest) copy_name display:{Name:<value>}
blocks/decorated_pot Decorated Pot 2.png Decorated Pot (decorated_pot) copy_nbt BlockEntityTag:{shards:<value>}
blocks/dispenser Dispenser.png Dispenser (dispenser) copy_name display:{Name:<value>}
blocks/dropper Dropper 3.png Dropper (dropper) copy_name display:{Name:<value>}
blocks/enchanting_table Enchanting Table (Item) 4.png Enchanting Table (enchanting_table) copy_name display:{Name:<value>}
blocks/furnace Furnace.png Furnace (furnace) copy_name display:{Name:<value>}
blocks/hopper Hopper (Item) 3.png Hopper (hopper) copy_name display:{Name:<value>}
blocks/player_head Player Head 5.png Player Head (player_head) copy_nbt SkullOwner:{Id:<value>,Properties:<value>,Name:<value>}
blocks/smoker Smoker 2.png Smoker (smoker) copy_name display:{Name:<value>}
blocks/trapped_chest Trapped Chest.png Trapped Chest (trapped_chest) copy_name display:{Name:<value>}
chests/abandoned_mineshaft Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) N/A (Equipment Durability) Damage:0
chests/ancient_city Diamond Hoe 3.png Diamond Hoe (diamond_hoe) set_damage Damage:<value>
enchant_with_levels Enchantments:<value>
Diamond Leggings (item) 3.png Diamond Leggings (diamond_leggings) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Iron Leggings (item) 2.png Iron Leggings (iron_leggings) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Regeneration Potion.png Potion of Regeneration (potion) set_potion Potion:"minecraft:strong_regeneration"
chests/ancient_city_ice_box Suspicious Stew.png Suspicious Stew (suspicious_stew) set_stew_effect Effects:<value>
chests/bastion_bridge Crossbow.png Crossbow (crossbow) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Golden Sword 3.png Golden Sword (golden_sword) N/A (Equipment Durability) Damage:0
Golden Chestplate (item) 3.png Golden Chestplate (golden_chestplate) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Helmet (item) 3.png Golden Helmet (golden_helmet) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Leggings (item) 3.png Golden Leggings (golden_leggings) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Boots (item) 3.png Golden Boots (golden_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Axe 3.png Golden Axe (golden_axe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/bastion_hoglin_stable Diamond Shovel 3.png Diamond Shovel (diamond_shovel) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Pickaxe 3.png Diamond Pickaxe (diamond_pickaxe) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Golden Axe 3.png Golden Axe (golden_axe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/bastion_other Diamond Pickaxe 3.png Diamond Pickaxe (diamond_pickaxe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Shovel 3.png Diamond Shovel (diamond_shovel) N/A (Equipment Durability) Damage:0
Crossbow.png Crossbow (crossbow) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Iron Sword 2.png Iron Sword (iron_sword) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Golden Boots (item) 3.png Golden Boots (golden_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Axe 3.png Golden Axe (golden_axe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Crossbow.png Crossbow (crossbow) N/A (Equipment Durability) Damage:0
Golden Sword 3.png Golden Sword (golden_sword) N/A (Equipment Durability) Damage:0
Golden Chestplate (item) 3.png Golden Chestplate (golden_chestplate) N/A (Equipment Durability) Damage:0
Golden Helmet (item) 3.png Golden Helmet (golden_helmet) N/A (Equipment Durability) Damage:0
Golden Leggings (item) 3.png Golden Leggings (golden_leggings) N/A (Equipment Durability) Damage:0
chests/bastion_treasure Diamond Sword 3.png Diamond Sword (diamond_sword) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Chestplate (item) 2.png Diamond Chestplate (diamond_chestplate) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Helmet (item) 3.png Diamond Helmet (diamond_helmet) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Leggings (item) 3.png Diamond Leggings (diamond_leggings) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Boots (item) 3.png Diamond Boots (diamond_boots) set_damage Damage:<value>
enchant_randomly Enchantments:<value>
Diamond Sword 3.png Diamond Sword (diamond_sword) N/A (Equipment Durability) Damage:0
Diamond Chestplate (item) 2.png Diamond Chestplate (diamond_chestplate) N/A (Equipment Durability) Damage:0
Diamond Helmet (item) 3.png Diamond Helmet (diamond_helmet) N/A (Equipment Durability) Damage:0
Diamond Boots (item) 3.png Diamond Boots (diamond_boots) N/A (Equipment Durability) Damage:0
Diamond Leggings (item) 3.png Diamond Leggings (diamond_leggings) N/A (Equipment Durability) Damage:0
chests/buried_treasure Leather Tunic 4.png Leather Tunic (leather_chestplate) N/A (Equipment Durability) Damage:0
Iron Sword 2.png Iron Sword (iron_sword) N/A (Equipment Durability) Damage:0
chests/desert_pyramid Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
chests/end_city_treasure Diamond Sword 3.png Diamond Sword (diamond_sword) enchant_with_levels StoredEnchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Boots (item) 3.png Diamond Boots (diamond_boots) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Chestplate (item) 2.png Diamond Chestplate (diamond_chestplate) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Leggings (item) 3.png Diamond Leggings (diamond_leggings) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Helmet (item) 3.png Diamond Helmet (diamond_helmet) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Pickaxe 3.png Diamond Pickaxe (diamond_pickaxe) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Diamond Shovel 3.png Diamond Shovel (diamond_shovel) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Sword 2.png Iron Sword (iron_sword) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Boots (item) 2.png Iron Boots (iron_boots) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Chestplate (item) 2.png Iron Chestplate (iron_chestplate) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Leggings (item) 2.png Iron Leggings (iron_leggings) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Helmet (item) 2.png Iron Helmet (iron_helmet) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
Iron Shovel 3.png Iron Shovel (iron_shovel) enchant_with_levels Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/igloo_chest Stone Axe 2.png Stone Axe (stone_axe) N/A (Equipment Durability) Damage:0
chests/jungle_temple Enchanted Book.gif Enchanted Book (enchanted_book) enchant_with_levels StoredEnchantments:<value>
chests/moon_lab[note 10] Elytra 2.png Elytra (elytra) N/A (Equipment Durability) Damage:0
Diamond Pickaxe 3.png Diamond Pickaxe (diamond_pickaxe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/nether_bridge Golden Sword 3.png Golden Sword (golden_sword) N/A (Equipment Durability) Damage:0
Golden Chestplate (item) 3.png Golden Chestplate (golden_chestplate) N/A (Equipment Durability) Damage:0
Flint and Steel 4.png Flint and Steel (flint_and_steel) N/A (Equipment Durability) Damage:0
chests/pillager_outpost Crossbow.png Crossbow (crossbow) N/A (Equipment Durability) Damage:0
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
chests/ruined_portal Flint and Steel 4.png Flint and Steel (flint_and_steel) N/A (Equipment Durability) Damage:0
Golden Sword 3.png Golden Sword (golden_sword) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Axe 3.png Golden Axe (golden_axe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Hoe 3.png Golden Hoe (golden_hoe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Shovel 3.png Golden Shovel (golden_shovel) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Pickaxe 4.png Golden Pickaxe (golden_pickaxe) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Boots (item) 3.png Golden Boots (golden_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Chestplate (item) 3.png Golden Chestplate (golden_chestplate) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Helmet (item) 3.png Golden Helmet (golden_helmet) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Golden Leggings (item) 3.png Golden Leggings (golden_leggings) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/shipwreck_map Map 2.png Map (filled_map) exploration_map Decorations:[{x:<value>,z:<value>,id:"+",type:26b,rot:180.0d}],map:<value>
set_name display:{Name:'{"translate":"filled_map.buried_treasure"}'}
chests/shipwreck_supply Suspicious Stew.png Suspicious Stew (suspicious_stew) set_stew_effect Effects:<value>
Leather Cap 4.png Leather Cap (leather_helmet) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Leather Tunic 4.png Leather Tunic (leather_chestplate) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Leather Pants 4.png Leather Pants (leather_leggings) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Leather Boots 4.png Leather Boots (leather_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
chests/simple_dungeon Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
chests/spawn_bonus_chest Stone Axe 2.png Stone Axe (stone_axe) N/A (Equipment Durability) Damage:0
Wooden Axe 2.png Wooden Axe (wooden_axe) N/A (Equipment Durability) Damage:0
Stone Pickaxe 2.png Stone Pickaxe (stone_pickaxe) N/A (Equipment Durability) Damage:0
Wooden Pickaxe 3.png Wooden Pickaxe (wooden_pickaxe) N/A (Equipment Durability) Damage:0
chests/stronghold_corridor Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) N/A (Equipment Durability) Damage:0
Iron Sword 2.png Iron Sword (iron_sword) N/A (Equipment Durability) Damage:0
Iron Chestplate (item) 2.png Iron Chestplate (iron_chestplate) N/A (Equipment Durability) Damage:0
Iron Helmet (item) 2.png Iron Helmet (iron_helmet) N/A (Equipment Durability) Damage:0
Iron Leggings (item) 2.png Iron Leggings (iron_leggings) N/A (Equipment Durability) Damage:0
Iron Boots (item) 2.png Iron Boots (iron_boots) N/A (Equipment Durability) Damage:0
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_with_levels StoredEnchantments:<value>
chests/stronghold_crossing Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) N/A (Equipment Durability) Damage:0
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_with_levels StoredEnchantments:<value>
chests/stronghold_library Enchanted Book.gif Enchanted Book (enchanted_book) enchant_with_levels StoredEnchantments:<value>
chests/underwater_ruin_big Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Leather Tunic 4.png Leather Tunic (leather_chestplate) N/A (Equipment Durability) Damage:0
Golden Helmet (item) 3.png Golden Helmet (golden_helmet) N/A (Equipment Durability) Damage:0
Fishing Rod 2.png Fishing Rod (fishing_rod) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Map 2.png Map (filled_map) exploration_map Decorations:[{x:<value>,z:<value>,id:"+",type:26b,rot:180.0d}],map:<value>
set_name display:{Name:'{"translate":"filled_map.buried_treasure"}'}
chests/underwater_ruin_small Stone Axe 2.png Stone Axe (stone_axe) N/A (Equipment Durability) Damage:0
Leather Tunic 4.png Leather Tunic (leather_chestplate) N/A (Equipment Durability) Damage:0
Golden Helmet (item) 3.png Golden Helmet (golden_helmet) N/A (Equipment Durability) Damage:0
Fishing Rod 2.png Fishing Rod (fishing_rod) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Map 2.png Map (filled_map) exploration_map Decorations:[{x:<value>,z:<value>,id:"+",type:26b,rot:180.0d}],map:<value>
set_name display:{Name:'{"translate":"filled_map.buried_treasure"}'}
chests/village/village_armorer Iron Helmet (item) 2.png Iron Helmet (iron_helmet) N/A (Equipment Durability) Damage:0
chests/village/village_shepherd Shears 2.png Shears (shears) N/A (Equipment Durability) Damage:0
chests/village/village_tannery Leather Tunic 4.png Leather Tunic (leather_chestplate) N/A (Equipment Durability) Damage:0
Leather Boots 4.png Leather Boots (leather_boots) N/A (Equipment Durability) Damage:0
Leather Cap 4.png Leather Cap (leather_helmet) N/A (Equipment Durability) Damage:0
Leather Pants 4.png Leather Pants (leather_leggings) N/A (Equipment Durability) Damage:0
chests/village/village_toolsmith Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) N/A (Equipment Durability) Damage:0
Iron Shovel 3.png Iron Shovel (iron_shovel) N/A (Equipment Durability) Damage:0
chests/village/village_weaponsmith Iron Pickaxe 3.png Iron Pickaxe (iron_pickaxe) N/A (Equipment Durability) Damage:0
Iron Sword 2.png Iron Sword (iron_sword) N/A (Equipment Durability) Damage:0
Iron Chestplate (item) 2.png Iron Chestplate (iron_chestplate) N/A (Equipment Durability) Damage:0
Iron Helmet (item) 2.png Iron Helmet (iron_helmet) N/A (Equipment Durability) Damage:0
Iron Leggings (item) 2.png Iron Leggings (iron_leggings) N/A (Equipment Durability) Damage:0
Iron Boots (item) 2.png Iron Boots (iron_boots) N/A (Equipment Durability) Damage:0
chests/woodland_mansion Chainmail Chestplate (item) 2.png Chainmail Chestplate (chainmail_chestplate) N/A (Equipment Durability) Damage:0
Diamond Hoe 3.png Diamond Hoe (diamond_hoe) N/A (Equipment Durability) Damage:0
Diamond Chestplate (item) 2.png Diamond Chestplate (diamond_chestplate) N/A (Equipment Durability) Damage:0
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
entities/stray Slowness Tipped Arrow.png Arrow of Slowness (tipped_arrow) set_potion Potion:"minecraft:slowness"
gameplay/dream_piglin_bartering Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Iron Boots (item) 2.png Iron Boots (iron_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Fire Resistance Potion.png Potion of Fire Resistance (potion) set_potion Potion:"minecraft:fire_resistance"
Fire Resistance Splash Potion.png Splash Potion of Fire Resistance (splash_potion) set_potion Potion:"minecraft:fire_resistance"
gameplay/fishing/junk Leather Boots 4.png Leather Boots (leather_boots) set_damage Damage:<value>
Water Bottle 2.png Water Bottle (potion) set_potion Potion:"minecraft:water"
Fishing Rod 2.png Fishing Rod (fishing_rod) set_damage Damage:<value>
gameplay/fishing/treasure Bow 2.png Bow (bow) set_damage Damage:<value>
enchant_with_levels Enchantments:<value>
Fishing Rod 2.png Fishing Rod (fishing_rod) set_damage Damage:<value>
enchant_with_levels Enchantments:<value>
Enchanted Book.gif Enchanted Book (enchanted_book) enchant_with_levels StoredEnchantments:<value>
gameplay/hero_of_the_village/armorer_gift Chainmail Helmet (item) 2.png Chainmail Helmet (chainmail_helmet) N/A (Equipment Durability) Damage:0
Chainmail Chestplate (item) 2.png Chainmail Chestplate (chainmail_chestplate) N/A (Equipment Durability) Damage:0
Chainmail Leggings (item) 2.png Chainmail Leggings (chainmail_leggings) N/A (Equipment Durability) Damage:0
Chainmail Boots (item) 2.png Chainmail Boots (chainmail_boots) N/A (Equipment Durability) Damage:0
gameplay/hero_of_the_village/fletcher_gift Uncraftable Tipped Arrow JE2.png Tipped Arrow (tipped_arrow) set_potion Potion:<value>
gameplay/hero_of_the_village/toolsmith_gift Stone Pickaxe 2.png Stone Pickaxe (stone_pickaxe) N/A (Equipment Durability) Damage:0
Stone Axe 2.png Stone Axe (stone_axe) N/A (Equipment Durability) Damage:0
Stone Hoe 2.png Stone Hoe (stone_hoe) N/A (Equipment Durability) Damage:0
Stone Shovel 2.png Stone Shovel (stone_shovel) N/A (Equipment Durability) Damage:0
gameplay/hero_of_the_village/weaponsmith_gift Stone Axe 2.png Stone Axe (stone_axe) N/A (Equipment Durability) Damage:0
Golden Axe 3.png Golden Axe (golden_axe) N/A (Equipment Durability) Damage:0
Iron Axe 5.png Iron Axe (iron_axe) N/A (Equipment Durability) Damage:0
gameplay/piglin_bartering Enchanted Book.gif Enchanted Book (enchanted_book) enchant_randomly StoredEnchantments:<value>
Iron Boots (item) 2.png Iron Boots (iron_boots) enchant_randomly Enchantments:<value>
N/A (Equipment Durability) Damage:0
Fire Resistance Potion.png Potion of Fire Resistance (potion) set_potion Potion:"minecraft:fire_resistance"
Fire Resistance Splash Potion.png Splash Potion of Fire Resistance (splash_potion) set_potion Potion:"minecraft:fire_resistance"

Midas Touch Vote

A player wearing a block of gold (after equipping a carved pumpkin) has a golden shine due to the applied Midas Touch vote.

While the "Claim the power of the mighty Midas" (midas_touch) vote is applied, players can turn items golden. The probability that a new vote will be this type is 125/113008, which is approximately 0.111%.[note 5] This replacement method is more limited since it only allows the NBT onto the golden result items. There are three methods to cause items to turn golden:

  1. Items in the players' main hand, off hand, and armor slots will convert to gold. Every second, the game chooses one of these 6 slots to turn golden.
  2. Item entities will always convert to gold when they contact the player. This will always occur when the player throws or picks up a stack of item. The item entity will still convert to gold if the player stands on the stack of items with a full inventory.
  3. Items inside a single gold chest will convert to gold while the player has it open. The gold chest is obtained by opening a chest while the vote is applied. Every game tick, there is a 1/20 chance that the game chooses a random slot inside the open single gold chest, the stack of items in that chosen slot will be converted to gold. This conversion will still work after repealing the Midas Touch vote. The conversion does not work in a double gold chest and also does not happen while the chest is closed.

Most items will turn into gold ingots and most blocks will turn into blocks of gold but there are exceptions. A full list of exceptions is below in a collapsible table. In addition, every result item will remain itself and not convert (except the golden apple which converts again into an enchanted golden apple).

Midas Touch Conversion Exceptions
Starting Item Result Item
Rail 3.png Rail (rail) Powered Rail 2.png Powered Rail (powered_rail)
Detector Rail 2.png Detector Rail (detector_rail)
Activator Rail 2.png Activator Rail (activator_rail)
Wooden Pickaxe 3.pngStone Pickaxe 2.pngIron Pickaxe 3.pngDiamond Pickaxe 3.pngNetherite Pickaxe 3.png Any Pickaxe[note 11] Golden Pickaxe 4.png Golden Pickaxe (golden_pickaxe
Wooden Sword 2.pngStone Sword 2.pngIron Sword 2.pngDiamond Sword 3.pngNetherite Sword 2.png Any Sword[note 12] Golden Sword 3.png Golden Sword (golden_sword)
Wooden Shovel 2.pngStone Shovel 2.pngIron Shovel 3.pngDiamond Shovel 3.pngNetherite Shovel 2.png Any Shovel[note 13] Golden Shovel 3.png Golden Shovel (golden_shovel)
Wooden Hoe 3.pngStone Hoe 2.pngIron Hoe 2.pngDiamond Hoe 3.pngNetherite Hoe 2.png Any Hoe[note 14] Golden Hoe 3.png Golden Hoe (golden_hoe)
Wooden Axe 2.pngStone Axe 2.pngIron Axe 5.pngDiamond Axe 3.pngNetherite Axe 2.png Any Axe[note 15] Golden Axe 3.png Golden Axe (golden_axe)
Leather Cap 4.pngChainmail Helmet (item) 2.pngIron Helmet (item) 2.pngDiamond Helmet (item) 3.pngNetherite Helmet (item) 2.pngTurtle Shell (item) 1.png Any Helmet[note 16] Golden Helmet (item) 3.png Golden Helmet (golden_helmet)
Leather Tunic 4.pngChainmail Chestplate (item) 2.pngIron Chestplate (item) 2.pngDiamond Chestplate (item) 2.pngNetherite Chestplate (item) 2.png Any Chestplate[note 17] Golden Chestplate (item) 3.png Golden Chestplate (golden_chestplate)
Leather Pants 4.pngChainmail Leggings (item) 2.pngIron Leggings (item) 2.pngDiamond Leggings (item) 3.pngNetherite Leggings (item) 2.png Any Leggings[note 18] Golden Leggings (item) 3.png Golden Leggings (golden_leggings)
Leather Boots 4.pngChainmail Boots (item) 2.pngIron Boots (item) 2.pngDiamond Boots (item) 3.pngNetherite Boots (item) 2.png Any Boots[note 19] Golden Boots (item) 3.png Golden Boots (golden_boots)
Apple.png Apple (apple) Golden Apple 2.png Golden Apple (golden_apple)
Golden Apple 2.png Golden Apple (golden_apple) Enchanted Golden Apple 2.gif Enchanted Golden Apple (enchanted_golden_apple)
Carrot 3.png Carrot (carrot) Golden Carrot 4.png Golden Carrot (golden_carrot)
Arrow (item) 1.png Arrow (arrow) Spectral Arrow 2.png Spectral Arrow (spectral_arrow)
Iron Ingot 3.png Iron Ingot (iron_ingot) Gold Ingot 4.png Gold Ingot (gold_ingot)[note 20]
Copper Ingot 2.png Copper Ingot (copper_ingot)
Netherite Ingot 1.png Netherite Ingot (netherite_ingot)
Iron Nugget 1.png Iron Nugget (iron_nugget) Gold Nugget 3.png Gold Nugget (gold_nugget)
Raw Copper 3.png Raw Copper (raw_copper) Raw Gold 3.png Raw Gold (raw_gold)
Raw Iron 3.png Raw Iron (raw_iron)
Melon Slice 2.png Melon Slice (melon_slice) Glistering Melon Slice 3.png Glistering Melon Slice (glistering_melon_slice)
Leather Horse Armor (item) 2.png Leather Horse Armor (leather_horse_armor) Golden Horse Armor (item) 3.png Golden Horse Armor (golden_horse_armor)
Iron Horse Armor (item) 3.png Iron Horse Armor (iron_horse_armor)
Diamond Horse Armor (item) 3.png Diamond Horse Armor (diamond_horse_armor)
Block of Raw Copper 2.png Block of Raw Copper (raw_copper_block) Block of Raw Gold 3.png Block of Raw Gold (raw_gold_block)
Block of Raw Iron 3.png Block of Raw Iron (raw_iron_block)
Copper Ore 2.png Copper Ore (copper_ore) Gold Ore 7.png Gold Ore (gold_ore)
Iron Ore 6.png Iron Ore (iron_ore)
Coal Ore 5.png Coal Ore (coal_ore)
Emerald Ore 4.png Emerald Ore (emerald_ore)
Redstone Ore 4.png Redstone Ore (redstone_ore)
Diamond Ore 5.png Diamond Ore (diamond_ore)
Lapis Lazuli Ore 4.png Lapis Lazuli Ore (lapis_ore)
Deepslate Copper Ore 2.png Deepslate Copper Ore (deepslate_copper_ore) Deepslate Gold Ore 2.png Deepslate Gold Ore (deepslate_gold_ore)
Deepslate Iron Ore 2.png Deepslate Iron Ore (deepslate_iron_ore)
Deepslate Coal Ore 1.png Deepslate Coal Ore (deepslate_coal_ore)
Deepslate Emerald Ore 1.png Deepslate Emerald Ore (deepslate_emerald_ore)
Deepslate Redstone Ore 2.png Deepslate Redstone Ore (deepslate_redstone_ore)
Deepslate Lapis Lazuli Ore 3.png Deepslate Lapis Lazuli Ore (deepslate_lapis_ore)
Nether Quartz Ore 3.png Nether Quartz Ore (nether_quartz_ore) Nether Gold Ore 2.png Nether Gold Ore (nether_gold_ore)

NBT Crafting

NBT crafting is a feature in 23w13a_or_b that allows for the player to craft items corresponding to NBT tags. Before NBT crafting can be used, the "Enable NBT crafting" (nbt_crafting) vote must be applied. The probability that a new vote will be this type is 500/113008, which is approximately 0.442%.[note 5] There are 16 tag items that can be used to craft the different NBT tags.

All possible NBT tags can be crafted except for the Byte Array, Int Array, and Long Array tags (not to be confused with the List tag). Byte Array and Long Array are impossible to obtain on items. However, there are three items that have the Int Array through default playthrough: the skull owner on player heads (Id in SkullOwner), the colors of firework stars (Colors and FadeColors in Explosions), and the colors of firework rockets (Colors and FadeColors in Explosions).

NBT Crafting Recipes
Item Description Recipe Shapeless
Name Specifies the names of tags.

May not be greater than 50 characters in length due to anvil limitations. Cannot be set to "Name" without either changing the translated name to be something else (singleplayer only), or transforming a compound tag into a name tag via a replacement vote containing the tag {name:"Name"}.

NBT Crafting Name.png
NBT Crafting NameChange.png
N/A
Tag A base crafting item for other tag types.
NBT Crafting Tag.png
N/A
Bit A base crafting item for other tag types.
NBT Crafting Bit1.png
NBT Crafting Bit2.png
N/A
Byte Represents a number between -128 and 127, inclusive.

Changing the amount of sticks present in the recipe changes the value the tag is set to.

NBT Crafting Byte.png
NBT Crafting ByteWithSticks.png
Yes
Short Represents a number between -32,768 and 32,767, inclusive.

The ordering of the byte items and their values are used in setting the value this tag is set to.

NBT Crafting Short.png
Yes
Int Represents a number between -2,147,483,648 and 2,147,483,647, inclusive.

The ordering of the byte or short items and their values are used in setting the value this tag is set to.

NBT Crafting Int.png
NBT Crafting Int2.png
Yes
Long Represents a number between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807, inclusive.

The ordering of the byte, short or int items and their values are used in setting the value this tag is set to.

NBT Crafting Long.png
NBT Crafting Long3.png
NBT Crafting Long2.png
Yes
Float Represents a number between ~-1.4012984643*10^−45 and ~3.4028234664*10^38, as defined by the Single-precision floating-point format. Also has special placeholders for -∞, +∞, and NaN.

The byte item may also be a short, int, or long. If the bit item is not included, then the value of the float is set to the closest equivalent. If the bit item is included, then the Float.intBitsToFloat() method will be used to convert the bit value of the byte to a float.

NBT Crafting Float.png
NBT Crafting Floatbits.png
Yes
Double Represents a number between ~-4.9406564584124654*10^−324 and ~1.7976931348623157*10^308, as defined by the Double-precision floating-point format. Also has special placeholders for -∞, +∞, and NaN.

The byte item may also be a short, int, or long. If the bit item is not included, then the value of the double is set to the closest equivalent. If the bit item is included, then the Double.intBitsToDouble() method will be used to convert the bit value of the byte to a double.

NBT Crafting Double.png
NBT Crafting Doublebits.png
Yes
String Stores a string.

May be concatenated with other String tags to create strings longer than the anvil's 50 character limit.

NBT Crafting String.png
NBT Crafting StringChange.png
NBT Crafting StringConcatination.png
Yes
Left Curly Bracket A base crafting item for other tag types.
NBT Crafting Lcurly.png
No
Right Curly Bracket A base crafting item for other tag types.
NBT Crafting Rcurly.png
No
Left Square Bracket A base crafting item for other tag types.
NBT Crafting Lsquare.png
No
Right Square Bracket A base crafting item for other tag types.
NBT Crafting Rsquare.png
No
List Contains a list of bytes, shorts, ints, longs, floats, doubles, strings, arrays, or compound tags.

Note that this will always be a NBTList tag, and will not allow for the creation of NBTByteArray, NBTIntArray, or NBTLongArray tags. May be concatenated to create lists with more than 7 entries.

NBT Crafting Array.png
NBT Crafting ListExample.png
NBT Crafting ArrayConcatination.png
No
Compound Holds all tag types, including itself. Tags nested over 512 layers deep will not save. The start of a compound or a list tag increases the layer count by 1.

Each tag requires a Name to identify it, which is to be placed before the tag when crafting.

May be concatenated to create compound tags with more than 3 entries.

NBT Crafting Compound.png
NBT Crafting CompoundExample.png
NBT Crafting CompoundConcatination.png
No

Int Array NBT Tag

Player Head nbt with the player's UUID stored as an int array tag

Since int arrays cannot be created from the NBT Crafting system, there are only two vanilla ways to obtain int array NBT tags:

  1. Only in 23w13a_or_b, the player_head_drop vote could be applied. When it is active, any player blown up by a charged creeper will drop their head. This is the only method of obtaining player heads with skin data associated. The Id int array tag is inside the SkullOwner compound NBT tag. The SkullOwner int array has four integers that represent the UUID of the slain player.
  2. Firework stars and firework rockets can have color and fade color tags when crafted that uses an int array. The Colors and FadeColors int array tags can be in any compound tag inside the Explosion list NBT tag. There are at most seven explosions in the Explosions tag, each of which can have their own Colors and FadeColors tag inside. There are at most eight colors in the Colors or FadeColors int array. The values inside the Colors and FadeColors int arrays are very limited to only the 16 values possible from dye colors.[note 21]

Once obtained, these int array NBT tags can be swapped onto other items like all the other NBT tag types.

Uses

There is an infinite number of possible NBT combinations that can be obtained on any item.[note 22] Unless an NBT tag has a coded function, it will have no effect on its item.

Used NBT

Used NBT has an in-game effect on items. Some NBT tags work on all types of items while other only work on a specific item or category of items.

NBT that has an effect on all items includes a name, lore, and enchantments. Some examples of NBT that is specifically used for one item or item category include Damage which only works on equipment and author that only works on written books. For help finding all used NBT in 23w13a_or_b, see the table in the Updating section. MCStacker for version 1.19 is a useful tool for creating custom item NBT.

Four especially powerful used NBT are mentioned below. These are EntityTag on spawn eggs which allow for almost any entity, BlockEntityTag and BlockStateTag on many blocks that allow for almost any block, and CustomPotionEffects on potions that allows for any effect.

Any Entity

A spawn egg with custom NBT can spawn almost any entity with almost any custom NBT. The entity of a spawn egg can be specified as id under EntityTag (regardless of spawn egg type). For example, the following NBT on a spawn egg will create a giant: {EntityTag:{id:"minecraft:giant"}}.

There are a few exceptions, command block minecarts, falling blocks, and spawner minecarts will spawn without their custom NBT in a world without cheats. This protects from users gaining access to commands. Additionally, since Int Arrays cannot be crafted, UUIDs cannot be crafted in entity NBT. UUIDs are used in NBT tags of mobs in the UUID of the entity itself, the Owner NBT of tameable mobs, the AngryAt NBT, the LeashedTo NBT, and more.

Any Block

Almost any block can be obtained using the BlockStateTag and BlockEntityTag NBT tags. The BlockStateTag tag allows the block states of the placed block to be controlled (e.g. orientation of a chest). The BlockEntityTag tag allows for the block entity data to be controlled (e.g. contents of a chest). Once obtained, these items can be used in any future version.

For one example, a waterlogged lit campfire with a diamond, an invalid item for a campfire, that will take 1 year to cook can be obtained by placing a campfire with the following NBT:

{BlockEntityTag:{Items:[{Slot:0b,id:"minecraft:diamond",Count:1b}],CookingTotalTimes:[I;630720000,0,0,0]},BlockStateTag:{lit:"true",waterlogged:"true"}}

Any Effect

Potions, splash potions, or lingering potions with the CustomPotionEffects NBT tag can give any effect in the game at any duration and level including those not normally obtainable in survival. Suspicious stew with the Effects NBT tag can give any effect and duration as well but can only give level 1 effects.

Unused NBT

Any NBT tag can be crafted even if it has no effect. For example, the NBT {Banana:1b} can be crafted and transferred onto a potato. This NBT is saved on the potato but does not cause any effects. With advanced tooltips enabled, the number of NBT tags will display, but the names and values of those NBT tags are not revealed and are unobservable. Additionally, items with differing NBTs will not stack.

Saving Items for Future Versions

Items that do not exist in 23w13a_or_b can be stored in a container with NBT, such as a chest, for future versions. The future item should be saved in one of the container's slots. The future item can have its own custom NBT saved within the container. The container should not be placed until the future item is added to the game. For example, a mace (added in 24w11a) with sharpness 100 can be saved in a chest with the following NBT:

{BlockEntityTag:{Items:[{Slot:1b,id:"minecraft:mace",Count:1b,tag:{Enchantments:[{id:"minecraft:sharpness",lvl:100s}]}}]}}

This chest should not be placed and opened until 24w11a (with the Update 1.21 experimental datapack enabled) or later otherwise the mace will disappear.

Commands

Command Block.png
Warning: Command Method 
This method gives permanent access to commands that are normally locked behind the command toggle, which may be dangerous. Perform at your own risk.
Downgrade2.png
Warning: Downgrading 
This feature requires downgrading which can result in crashes, data loss, or corruption, and requires specific versions. Follow the page instructions carefully.

In 23w13a_or_b itself, there is no way to run commands using any NBT on any item due to several command running protections implemented by Mojang to safeguard servers. For example, a spawn egg can be crafted that can spawn a Minecart with Command Block that has a command. This spawn egg will spawn a command block minecart when used, but it will have no command set when it is either not spawned by a player, used in a world with cheats disabled, or used on a server where the player does not have operator privileges. Below are all operator protected blocks and entities:

  • Command block and command block minecart items cannot be placed without Creative mode and cheats or operator privileges.
  • Lectern, mob spawner, and sign blocks will place with no custom NBT without cheats or operator privileges.
  • Command block minecarts, falling blocks, and spawner minecarts will spawn with no custom NBT without cheats or operator privileges.

However, if the player downgrades the command granting items to an earlier version before these protections exist, commands can run in the world. The most recent version range where this is possible is in 19w34a to 19w35a (1.15 snapshots) with beehives or bee nests.[2] In these snapshots, beehives and bee nests can spawn any entity, including a falling command block with a command set in it. This downgrade is far enough back that any chunks loaded will be regenerated, including spawn chunks. The player should avoid loading any chunks they want to save. An example of the necessary NBT to create a bee nest with a falling block with a command inside:

{BlockEntityTag:{Bees:[{EntityData:{id:"minecraft:falling_block",BlockState:{Name:"minecraft:command_block"},TileEntityData:{Command:"give @p diamond 64"},Time:1}}]}}

In this example, the command is give @p diamond 64, but that command can be replaced with any other command.

From 18w21a (a 1.13 snapshot) and 1.13.2-pre1, spawner minecarts have no operator restrictions when spawned from a spawn egg.[3] Without these restrictions, it is possible to set spawner minecarts to spawn any entity with any NBT, including operator restricted entities. An example of the necessary NBT to create a spawn egg that spawns a spawner minecart that spawns falling command blocks with a command inside:

18w21a to 1.13-pre2:[4][5]

{EntityTag:{SpawnData:{id:"minecraft:falling_block",BlockState:{Name:"minecraft:command_block"},TileEntityData:{Command:"give @p diamond 64"},Time:1}},id:"minecraft:spawner_minecart",display:{Name:"a custom name is necessary"}}

1.13-pre3 to 1.13.2-pre1:

{EntityTag:{id:"minecraft:spawner_minecart",SpawnData:{id:"minecraft:falling_block",BlockState:{Name:"minecraft:command_block"},TileEntityData:{Command:"give @p diamond 64"},Time:1}}}

From 14w07a (a 1.8 snapshot) to 1.8.5, there are no operator restrictions on placing blocks with NBT in the BlockEntityData tag.[6] Three items can be used to run commands:

  1. Command blocks: An example of the necessary NBT is {BlockEntityTag:{Command:"give @p diamond 64"}}.
  2. Signs: Signs gained the ability to run commands through custom click events in 14w25a (a 1.8 snapshot). An example of the necessary NBT on a sign is {BlockEntityTag:{Text1:"{\"text\":\"run command\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"give @p diamond 64\"}}"}}. Signs are more complicated than command blocks; signs cannot be directly downgraded from 23w13a_or_b to this 1.8 version range since there was only one variant of sign with the id minecraft:sign. Signs must be stored in a container with the minecraft:sign id and the container cannot be placed and opened until after the downgrade. Signs additionally would run their commands with an operator level of 4 instead of 2 from 14w25a to 1.8.4.
  3. Spawners: Like signs, the spawner block ID used to be minecraft:mob_spawner instead of minecraft:spawner, so it must be created in a container that is not placed and opened until after downgrading. Spawners can spawn any of three command granting entities:
    1. Falling block of one of the three command granting blocks above
    2. Spawner minecart that spawns another one of these command granting entities
    3. Command block minecart with a set command that can be run using an activator rail

Updating

In 24w09a, not many versions after 23w13a_or_b, item NBT is completely replaced with item components. The components available are restricted by the data fixer, the code that converts item NBT into components.[note 23] While used NBT is converted into its appropriate component, any unrecognized NBT for an item is transferred into the minecraft:custom_data component. Any NBT allows for almost any minecraft:custom_data component, except the NBT tags that actually convert cannot be obtained in the minecraft:custom_data component. On the contrary, some components have no NBT that converts into them. For example, the minecraft:food component had no equivalent in NBT and so no NBT will convert into this component. During conversion, many tags employ checks to ensure a valid data type and/or value is converted into the component.

A list of NBT to component conversion is below. The table shows which components each NBT tag can effect and which items this conversion applies on. Many NBT converts on all items but some are restricted to the items they normally apply to. For example, the LodestonePos NBT tag will convert into the minecraft:lodestone_tracker component for compasses but will convert into the minecraft:custom_data component on any other item.

Item NBT to Item Components Conversions
Item(s) Conversion Applies To NBT Tag Component
Every Item HideFlags minecraft:attribute_modifiers
minecraft:enchantments
minecraft:unbreakable
minecraft:can_place_on
minecraft:can_break
minecraft:trim
minecraft:dyed_color
minecraft:hide_additional_tooltip
Damage minecraft:damage
RepairCost minecraft:repair_cost
CustomModelData minecraft:custom_model_data
BlockStateTag minecraft:block_state
EntityTag minecraft:entity_data
BlockEntityTag minecraft:block_entity_data
minecraft:banner_patterns
minecraft:base_color
minecraft:bees
minecraft:block_entity_data
minecraft:container
minecraft:container_loot
minecraft:lock
minecraft:note_block_sound
minecraft:pot_decorations
Unbreakable minecraft:unbreakable
Enchantments minecraft:enchantments
minecraft:enchantment_glint_override
display minecraft:custom_name
minecraft:lore
minecraft:dyed_color
minecraft:map_color
CanDestroy minecraft:can_break
CanPlace minecraft:can_place_on
AttributeModifiers minecraft:attribute_modifiers
Trim minecraft:trim
Enchanted Book.gif Enchanted Book (enchanted_book) StoredEnchantments minecraft:stored_enchantments
Crossbow.png Crossbow (minecraft:crossbow) ChargedProjectiles minecraft:charged_projectiles
Charged Deleted[note 24]
Bundle 2.png Bundle (minecraft:bundle) Items minecraft:bundle_contents
Map 2.png Map (minecraft:filled_map) map minecraft:map_id
Decorations minecraft:map_decorations

Uncraftable Potion.png Potion (minecraft:potion)
Splash Uncraftable Potion.png Splash Potion (minecraft:splash_potion)
Lingering Uncraftable Potion.png Lingering Potion (minecraft:lingering_potion)
Uncraftable Tipped Arrow JE2.png Tipped Arrow (minecraft:tipped_arrow)

Potion minecraft:potion_contents
CustomPotionColor
custom_potion_effects
Book and Quill 2.png Book and Quill (minecraft:writable_book) pages minecraft:writable_book_content
filtered_pages
Written Book.gif Written Book (minecraft:written_book) pages minecraft:written_book_content
filtered_pages
title
filtered_title
author
resolved
generation
Suspicious Stew.png Suspicious Stew (minecraft:suspicious_stew) Effects minecraft:suspicious_stew_effects
effects[note 25]
Debug Stick.gif Debug Stick (minecraft:debug_stick) DebugProperty minecraft:debug_stick_state

Bucket of Pufferfish JE2 BE2.png Bucket of Pufferfish (minecraft:pufferfish_bucket)
Bucket of Salmon JE2 BE2.png Bucket of Salmon (minecraft:salmon_bucket)
Bucket of Cod JE2 BE2.png Bucket of Cod (minecraft:cod_bucket)
Bucket of Tropical Fish JE3 BE2.png Bucket of Tropical Fish (minecraft:tropical_fish_bucket)
Bucket of Axolotl JE1 BE1.png Bucket of Axolotl (minecraft:axolotl_bucket)
Bucket of Tadpole JE1 BE1.png Bucket of Tadpole (minecraft:tadpole_bucket)

NoAI minecraft:bucket_entity_data
Silent
NoGravity
Glowing
Invulnerable
Health
Age
Variant
HuntingCooldown
BucketVariantTag
Goat Horn JE1 BE1.png Goat Horn (minecraft:goat_horn) instrument minecraft:instrument
Knowledge Book JE2.png Knowledge Book (minecraft:knowledge_book) Recipes minecraft:recipes
Compass JE3 BE3.gif Compass (minecraft:compass) LodestonePos minecraft:lodestone_tracker
LodestoneDimension
LodestoneTracked
Firework Rocket JE2 BE2.png Firework Rocket (minecraft:firework_rocket) Fireworks minecraft:fireworks
Firework Star JE1 BE1.png Firework Star (minecraft:firework_star) Explosion minecraft:firework_explosion
Player Head 5.png Player Head (minecraft:player_head) SkullOwner minecraft:profile

See also

Notes

  1. There are two exceptions. First, the Byte Array, Int Array, and Long Array tag types that cannot be crafted, see the NBT Crafting section. Second, the Damage tag on equipment must be the int type, this cannot be changed.
  2. In addition to the 90% chance when it will guaranteed be the desired source item, the item could be chosen randomly from all items in the other 10% chance. There is a 10% * 1/1288 chance of this happening. Therefore, the combined probability of getting the desired source item is approximately 90.00776%
  3. Listed in Language list as "Català (Catalunya)" and "Català (Valencià) (País Valencià)"
  4. The resource pack makes the following text replacements:
    "Music Disc"
    • music_disc_5 -> "Music Disc (5)"
    • music_disc_11 -> "Music Disc (11)"
    • music_disc_13 -> "Music Disc (13)"
    • music_disc_blocks -> "Music Disc (Blocks)"
    • music_disc_cat -> "Music Disc (Cat)"
    • music_disc_chirp -> "Music Disc (Chirp)"
    • music_disc_far -> "Music Disc (Far)"
    • music_disc_mall -> "Music Disc (Mall)"
    • music_disc_mellohi -> "Music Disc (Mellohi)"
    • music_disc_otherside -> "Music Disc (Otherside)"
    • music_disc_pigstep -> "Music Disc (Pigstep)"
    • music_disc_stal -> "Music Disc (Stal)"
    • music_disc_strad -> "Music Disc (Strad)"
    • music_disc_wait -> "Music Disc (Wait)"
    • music_disc_ward -> "Music Disc (Ward)"
    "Banner Pattern"
    • creeper_banner_pattern -> "Banner Pattern (Creeper)"
    • flower_banner_pattern -> "Banner Pattern (Flower)"
    • globe_banner_pattern -> "Banner Pattern (Globe)"
    • mojang_banner_pattern -> "Banner Pattern (Thing)"
    • m_banner_pattern -> "Banner Pattern (New Thing)"
    • piglin_banner_pattern -> "Banner Pattern (Snout)"
    • skull_banner_pattern -> "Banner Pattern (Skull)"
    "Air"
    • air -> "Air (Nothing)"
    • air_block -> "Air (Block)"
  5. 5.0 5.1 5.2 5.3 5.4 5.5 The probability that a certain vote appears is pulled from an internal weighted list in the game. For a full list of each vote's weight, see the list created by Captain_S0L0. The probability in the article only considers "simple votes", these are vote that are not a repeal vote nor a combined vote. Repeal votes are determined by the value set by new_vote_repeal_vote_chance. The repeal vote chance defaults to 50% and can be set to any integer percentage from 20% to 80% (inclusive) by the new_vote_repeal_vote_chance vote. When a vote is chosen to be a repeal vote, it cannot be the given vote type and so Probability of Given Vote = (1 - Probability of Repeal Vote) * Probability of Vote Type from Weighted List. If there are no applied votes to repeal or all applied votes already have a repeal vote targeting them, then whenever a new repeal vote chance occurs the vote will fail to generate. Combined votes of the form "[Vote A], but [Vote B]" can contain the given vote of interest. The new_vote_extra_effect_chance determines the probability that a new vote part will be added at each step and the new_vote_extra_effect_max_count determines the maximum number of votes that can be added to a base vote. The extra effect chance defaults to 30% but can be set to any integer percentage from 0% to 80% using the new_vote_extra_effect_chance vote. The max count defaults to 1 but can be set to any integer from 0 to 5 using the new_vote_extra_effect_max_count vote. Together, these values determine the chance that the given vote will appear inside the combined votes. Combined votes can contain all types of votes, they use the same weighted list except the votes are removed as they are chosen since there can be no duplicate vote types. bluecrab2's 23w13a_or_b Vote Probability Calculator tool can be used to calculate the exact probability of a vote type appearing.
  6. blocks/black_banner, blocks/blue_banner, blocks/brown_banner, blocks/cyan_banner, blocks/gray_banner, blocks/green_banner, blocks/light_blue_banner, blocks/light_gray_banner, blocks/lime_banner, blocks/magenta_banner, blocks/orange_banner, blocks/pink_banner, blocks/purple_banner, blocks/red_banner, blocks/white_banner, and blocks/yellow_banner
  7. Black Banner (black_banner), Blue Banner (blue_banner), Brown Banner (brown_banner), Cyan Banner (cyan_banner), Gray Banner (gray_banner), Green Banner (green_banner), Light Blue Banner (light_blue_banner), Light Gray Banner (light_gray_banner), Lime Banner (lime_banner), Magenta Banner (magenta_banner), Orange Banner (orange_banner), Pink Banner (pink_banner), Purple Banner (purple_banner), Red Banner (red_banner), White Banner (white_banner), and Yellow Banner (yellow_banner)
  8. blocks/shulker_box, blocks/black_shulker_box, blocks/blue_shulker_box, blocks/brown_shulker_box, blocks/cyan_shulker_box, blocks/gray_shulker_box, blocks/green_shulker_box, blocks/light_blue_shulker_box, blocks/light_gray_shulker_box, blocks/lime_shulker_box, blocks/magenta_shulker_box, blocks/orange_shulker_box, blocks/pink_shulker_box, blocks/purple_shulker_box, blocks/red_shulker_box, blocks/white_shulker_box, and blocks/yellow_shulker_box
  9. Shulker Box (shulker_box), Black Shulker Box (black_shulker_box), Blue Shulker Box (blue_shulker_box), Brown Shulker Box (brown_shulker_box), Cyan Shulker Box (cyan_shulker_box), Gray Shulker Box (gray_shulker_box), Green Shulker Box (green_shulker_box), Light Blue Shulker Box (light_blue_shulker_box), Light Gray Shulker Box (light_gray_shulker_box), Lime Shulker Box (lime_shulker_box), Magenta Shulker Box (magenta_shulker_box), Orange Shulker Box (orange_shulker_box), Pink Shulker Box (pink_shulker_box), Purple Shulker Box (purple_shulker_box), Red Shulker Box (red_shulker_box), White Shulker Box (white_shulker_box), and Yellow Shulker Box (yellow_shulker_box)
  10. This loot table is only available at the ACME Self-Building Lunar Base on the Moon dimension in 23w13a_or_b.
  11. Wooden Pickaxe (wooden_pickaxe), Stone Pickaxe (stone_pickaxe), Iron Pickaxe (iron_pickaxe), Diamond Pickaxe (diamond_pickaxe), and Netherite Pickaxe (netherite_pickaxe)
  12. Wooden Sword (wooden_sword), Stone Sword (stone_sword), Iron Sword (iron_sword), Diamond Sword (diamond_sword), and Netherite Sword (netherite_sword)
  13. Wooden Shovel (wooden_shovel), Stone Shovel (stone_shovel), Iron Shovel (iron_shovel), Diamond Shovel (diamond_shovel), and Netherite Shovel (netherite_shovel)
  14. Wooden Hoe (wooden_hoe), Stone Hoe (stone_hoe), Iron Hoe (iron_hoe), Diamond Hoe (diamond_hoe), and Netherite Hoe (netherite_hoe)
  15. Wooden Axe (wooden_axe), Stone Axe (stone_axe), Iron Axe (iron_axe), Diamond Axe (diamond_axe), and Netherite Axe (netherite_axe)
  16. Leather Cap (leather_helmet), Chainmail Helmet (chainmail_helmet), Iron Helmet (iron_helmet), Diamond Helmet (diamond_helmet), Netherite Helmet (netherite_helmet), and Turtle Shell (turtle_helmet)
  17. Leather Tunic (leather_chestplate), Chainmail Chestplate (chainmail_chestplate), Iron Chestplate (iron_chestplate), Diamond Chestplate (diamond_chestplate), and Netherite Chestplate (netherite_chestplate)
  18. Leather Pants (leather_leggings), Chainmail Leggings (chainmail_leggings), Iron Leggings (iron_leggings), Diamond Leggings (diamond_leggings), and Netherite Leggings (netherite_leggings)
  19. Leather Boots (leather_boots), Chainmail Boots (chainmail_boots), Iron Boots (iron_boots), Diamond Boots (diamond_boots), and Netherite Boots (netherite_boots)
  20. This is written as an exception in the code, but results in the same default item
  21. List of Dye Color Int Values
    Dye Color Int Value
    White 15790320
    Light Gray 11250603
    Gray 4408131
    Black 1973019
    Brown 5320730
    Red 11743532
    Orange 15435844
    Yellow 14602026
    Lime 4312372
    Green 3887386
    Cyan 2651799
    Light Blue 6719955
    Blue 2437522
    Purple 8073150
    Magenta 12801229
    Pink 14188952
  22. While an infinite number of NBT can be crafted, only a finite number can be saved and updated due to file write size limitations.
  23. The item NBT to item component conversion data fixer is found within the net.mojang.util.datafix.Fixes.ItemStackComponentizationFix.java file.
  24. The Charged NBT is not needed in 24w09a and later because the crossbow will appear charged if it has the charged_projectiles component. Therefore, the game deletes this NBT tag from crossbows.
  25. The effects NBT is unused on supicious stew, but it is removed instead of going into the custom_data component.

References

  1. MC-261411. bugs.mojang.com.
  2. MC-159419 - Private issue with title "Custom beehive item can be used to spawn any entity, including command blocks.", known from the 19w36a changelog.
  3. MC-136759 - Private issue with title "Spawn eggs do not make sure that the entity is valid for the egg, allowing for arbitrary command execution in certain cases.", known from the 1.13.2 changelog.
  4. MC-130690. bugs.mojang.com.
  5. MC-130242. bugs.mojang.com.
  6. MC-75630 - Private issue with title "Exploit with signs and command blocks.", known from the 1.8.6 changelog.