Java Edition:Repair Cost
The repair cost of an item is used to track the amount of anvil operations that have been performed on it. This tag can be used to indicate if an item has never had any anvil operations applied, which can differentiate normally obtainable items from discontinued items. It also can have a discontinued value, as the anvil mechanics have changed several times.
Anvil Mechanics
12w41a to 1.4
From 12w41a (a 1.4 snapshot) to 1.7.10, an item's repair cost would increase by 2 with each anvil operation. This allows for a repair cost of 2, 4, 6, 8, 10, 12, 14, 16, and 18 on any item. The maximum repair cost is obtained by renaming an unenchanted item 9 times, and is limited from going further by the maximum cost of 39 levels per anvil operation. In 12w41b (a 1.4 snapshot), anvils did not work at all, temporarily discontinuing all items with a repair cost.
1.4.1 to 1.7.10
1.4.1 changed anvils such that renaming an item or performing an anvil operation on a renamed item would set the item's repair cost to 2. All other mechanics work the same as before. This discontinues renamed items with a repair cost more than 2.
14w02a to 14w03b
From 14w02a to 14w03b (1.8 snapshots), an item's repair cost would increase by 1 with each anvil operation. This allows for any positive integer repair cost between 1 and 2,147,483,647 on any item. The normal level limit is bypassed when renaming, capping the cost at 39 levels per rename. The repair cost cannot be any higher than 2,147,483,647 as if the total cost of an anvil operation is negative (occurs due to integer overflow), the item cannot be taken from the output slot.
14w04a to 15w41b
From 14w04a (a 1.8 snapshot) to 15w41b (a 1.9 snapshot), an item's repair cost would increase to the old repair cost times 2 plus 1 with each anvil operation. This allows for a repair cost of 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, and 2147483647. These changes discontinue many repair costs. The repair cost cannot be any higher than 2,147,483,647 as if the total cost of an anvil operation is negative (occurs due to integer overflow), the item cannot be taken from the output slot. Other values are possible from older discontinued repair cost values.
15w42a to Present
15w42a (a 1.9 snapshot) changed renaming in anvils such that only renaming an item does not increase the repair cost. This discontinues repair costs higher than 31, as renaming no longer increases the repair cost beyond the anvil level limit. From 15w42a to 23w32a, this also allows for a repair cost of 0 by renaming an item that has no former repair cost. In 23w33a and later, renaming an item no longer adds a RepairCost:0 to an item and in 24w09a the RepairCost:0 tag is removed.
Items with Discontinued Repair Cost
Repair Cost 0
From 15w42a (a 1.9 snapshot) to 23w32a (a 1.20.2 snapshot), anvils and grindstones could be used to give any item a repair cost of 0.[1][2] Either rename an item that has not had any former anvil operations, or combine two items in a grindstone. The grindstone method does not work for books in 1.14.1 Pre-Release 1 and above.[3] The output of either method will have a repair cost of 0. The name can be stripped from renamed items if the name bar is either fully clear or only spaces (version dependent). Items with a repair cost of 0 have the tag removed in 24w09a (a 1.20.5 snapshot) with the introduction of item components.
Named No Repair Cost
The same mechanics that allow for obtaining items with a repair cost of 0 also discontinue any renamed item that has no repair cost tag before 23w33a (a 1.20.2 snapshot). These items are recontinued in 23w33a.
15w14a Villager
In the April Fools' snapshot 15w14a, placing any item into either buy slot of a villager would replace the item with one paper with the name Thanks for your donation. This named paper does not have a repair cost tag.
Placed Minecarts
Several varieties of renamed minecarts are obtainable from 16w03a (a 1.9 snapshot) to 1.10.2 simply by breaking minecart entities. The types of minecarts placed would each drop different names, listed below.[4] These items are recontinued in 16w35a (a 1.11 snapshot) by the next method.
- Minecart ->
entity.MinecartRideable.name - Minecart with Chest
- ->
container.minecart(16w03a - 1.9) - ->
Chest minecart(1.9.1 pre1) - ->
Minecart with Chest(1.9.1 pre2 - 1.10.2)
- ->
- Minecart with Furnace ->
entity.MinecartFurnace.name(16w03a - 1.10.2) - Minecart with Spawner ->
entity.MinecartSpawner.name( 16w03a - 1.10.2) - Minecart with Hopper
- ->
container.minecart(16w03a - 1.9) - ->
Hopper minecart(1.9.1 pre1) - ->
Minecart with Hopper(1.9.1 pre2 - 1.10.2)
- ->
- Minecart with TNT ->
entity.MinecartTNT.name
Placed Renamed Items
From 16w35a (a 1.11 snapshot) to 25w42a (present), placing certain renamed items and then breaking them will keep their name. In all cases, the mined block entity or killed entity will lose its repair cost.[5] The following items can have their repair cost removed using this method:
- Barrel
- Chest
- Furnace
- Blast Furnace
- Smoker
- Every Color Banner
- Every Color/Uncolored Shulker Box
- Enchanting Table
- Dispenser
- Dropper
- Brewing Stand
- Hopper
- Every Minecart Variant
- Trapped Chest
In the April Fools' snapshot 3D Shareware v1.34, renamed crossbows can be found in scattered barrels created in new chunks. These crossbows are always be named BFC9000, and have no repair cost.
Single Level 1 Enchantment Enchanted Book with Non-Zero Repair Cost
From 12w49a (a 1.4 snapshot) to 16w50a (a 1.11.1 snapshot), it was possible to create an enchanted book that only has a single enchantment at level 1 that has a repair cost higher than zero. Enchanted books with a level 2-5 enchantment with a non-zero repair cost can be created by combining two lower level enchanted books. From 12w49a to 16w50a, these can be created by combining two level 1 incompatible enchantments, such as Sharpness and Smite.[6] From 14w02a to 14w03b (1.8 snapshots), these can be created by renaming the enchanted book, although this cannot create an enchanted book without a name with a repair cost of 1. From 12w49a to 25w42a (present), this can be created by combining a no NBT enchanted book with the level 1 enchanted book, although no NBT enchanted books are not available in all versions in this range, making this a dependent feature.
/enchant
From 18w06a (1.13 snapshot) to 18w07c, the /enchant command could be used with cheats disabled.[7] Enchantment combinations that require the usage of an anvil, and the application of a repair cost, can be acquired without gaining a repair cost as the command does not apply it. Enchantments may also be applied to gear that would normally be impossible due to the level limitation of anvils.
Removal of Combat Test Enchantments
In 24w09a (a 1.20.5 snapshot) and above, the Chopping and Cleaving enchantments from the Combat Test updates are removed from any enchantment data. Unenchanted axes can maintain a non-zero repair cost from being enchanted in an anvil with either Chopping or Cleaving.
References