{{About|the block|the file format|Anvil file format}}
{{Block
| image = <gallery>
Anvil.png|Anvil
Chipped Anvil.png|Chipped
Damaged Anvil.png|Damaged
Anvil BE.png|Anvil (BE)
Slightly Damaged Anvil BE.png | Slightly Damaged
Very Damaged Anvil BE.png | Very Damaged
Broken Anvil.png | Broken
</gallery>
|transparent=Yes
|light=No
|tool=wooden pickaxe
|renewable=Yes
|stackable=Yes (64), same damage state only
|flammable=No
|lavasusceptible=No
}}
An '''anvil''' is a gravity-affected utility [[block]] used to rename items, combine [[enchantments]] and repair items without losing the enchantments. An anvil has limited durability, and as it is used or dropped too far, gradually becomes a '''chipped anvil''', then a '''damaged anvil''', then breaks into nothing.

== Obtaining ==
=== Breaking ===
Anvils can be mined using any [[pickaxe]]. If mined without a pickaxe, they drop nothing.
{{breaking row|horizontal=1|Anvil|Pickaxe|Wood}}

=== Natural generation ===
A damaged anvil generates in the "Forge room" of the [[woodland mansion]].

=== Crafting ===
A total of 31 iron ingots (including 27 for three [[block of iron|blocks of iron]]) are required to craft an anvil.
{{Crafting
|A1=Block of Iron
|B1=Block of Iron
|C1=Block of Iron
|B2=Iron Ingot
|A3=Iron Ingot
|B3=Iron Ingot
|C3=Iron Ingot
|Output=Anvil
|type=Decoration block
}}

== Usage ==
=== Repairing and renaming items ===
[[File:Anvil GUI.png|thumb|right|The GUI of the anvil.]]

{{main|Anvil mechanics}}

Anvils have two modes to repair items that have a durability rating:
* As with the [[grindstone]], a player may repair items by combining two similar items. With the anvil, however, the target retains its enchantments and may gain new ones from the sacrificed items.
* Alternatively, a player can use materials originally required in the crafting of the item ([[iron ingot]]s for iron items with durability, [[diamond]]s for diamond items with durability) to repair a single item. One material can repair 25% of the target's maximum durability. This is a very good deal in the case of a [[chestplate]], for example; a full repair (four materials) would total only half of the item's original cost (eight materials). In the case of tools and weapons, however, this may be a significantly less economical option; combining two diamond shovels would cost two diamonds in total, while up to four diamonds could be required to directly repair one. Still, it may be worth making the more expensive upgrade if the enchantments are considered difficult to obtain.

If the items are unable to be combined, a red "X" appears over the arrow pointing to the slot of the resulting item. Also, if the target item is at full durability and the sacrifice does not have any enchantments, the anvil will also refuse to combine the items, unless if [[#Renaming|renaming]] the item to a valid name.

In addition, the player can rename any item – not just items with durability – by using an anvil.

==== Repairing ====
{{See also|Repair}}

[[File:Anvil3.png|thumb|Example showing a repair of two diamond pickaxes.]]

Repairing with materials works for the most part, but not with all items: in general, repairing works for items with their material in the default name. For example, an anvil can repair an ''iron'' pickaxe with materials (iron in this case) while an anvil cannot repair bows or shears except with other bows or shears. Special cases: chain armor can be repaired with iron ingots, [[turtle shell]]s can be repaired with [[scute]]s, and [[elytra]] can be repaired with [[phantom membrane]]s. The repair does not need to be complete; one material repairs {{frac|1|4}} of the item's maximum durability. Repair of an unenchanted item can cost more material than simply crafting a new item or combining damaged items. The exception is armor, which consumes less material at the cost of experience levels.

Repairing with a matching item works for any item with durability including bows, shears and so on. The items must be a matching tool and of a matching material. For example, a golden pickaxe cannot combine with a golden sword or iron pickaxe.

In both cases, the resulting durability is limited to the item's maximum, and there is no discount for "over-repair".

As a subset of repairing one item with another, the anvil can transfer enchantments from the sacrifice to the target. This can have a synergistic effect when both items share identical enchantments, or simply add to each other when they do not. Two Sharpness II swords can be combined to make a Sharpness III sword, for example, or a pickaxe with Efficiency can be combined with one that has Unbreaking. This can produce enchantments and combinations that are not possible with an enchanting table. But even so, some enchantments cannot be combined if they are similar, or contradicting, in terms of what they do. If the target is damaged, the player has to pay for the repair as well as the transfer.

Transferring high-level enchantments is more expensive, and renaming an item has an additional surcharge. The anvil has a limit of 39 levels; beyond that, repairs are refused. This limit is not present in Creative mode.

Every time armor or tools are repaired, the minimum experience cost doubles (e.g., 1 level, 2 levels, 4 levels, 8 levels, etc.).

==== Renaming ====
Any item or stack of items can be renamed at a cost of one level plus any prior-work penalty. If the player is only renaming, the maximum total cost is 39 levels. The maximum length for renaming is 30 characters{{only|Bedrock|short=1}} or 50 characters{{only|Java|short=1}}. Some items have special effects when renamed:
* A [[name tag]] must be renamed before it can be used.
* Renaming a [[Bucket of Water Mob|bucket of fish or axolotl]] renames the mob inside as well, meaning a fish or axolotl can be named without a name tag.{{only|java}}
* A renamed item (can be any item, doesn't need to be a weapon) that kills another player or tamed mob causes the name to appear in the death message.
* A renamed [[spawn egg]] produces a mob with the same name.
* [[Chest]]s, [[trapped chest]]s, [[shulker box]]es, [[furnace]]s, [[hopper]]s, [[dropper]]s, [[dispenser]]s, [[minecarts with chests]], [[minecarts with hoppers]], [[enchantment tables]], [[barrel]]s, [[smoker]]s, [[blast furnace]]s and [[brewing stand]]s display the name in their GUI when placed.
* Renamed [[command blocks]] use their name in chat messages instead of {{code|[@]}}.

Any name changes to items are applied to the data tag <code>{Item:{tag:{display:{Name:"{\"text\":\"<name>\"}"}}}}</code>. Similarly, this data tag can be accessed by the {{code|nbt}} argument using [[target selectors]].

If the item name field is left blank, or is only whitespace or {{w|non-breaking space}}s (or a combination of both), the default name for that item is used instead. Also, if the item name is unchanged from its current name (which can occur when renaming an item for the first time and using any of the aforementioned blank parameters), a red "X" will appear on top of the arrow in the GUI.

Named items do not stack with unnamed or differently-named items of the same type.

=== Enchanted books ===
[[Enchanted book]]s are used to enchant tools. Enchanted books themselves can be combined to create higher-tiered books. This makes an anvil an alternative to the [[enchantment table]].

=== Falling anvils ===
{{Entity
| title = Falling Anvil
| image = Anvil.png|Chipped Anvil.png|Damaged Anvil.png
|image2=Anvil BE.png|Slightly Damaged Anvil BE.png|Very Damaged Anvil BE.png
|image3=Broken Anvil.png
|imagesize=150px
|id='''PC''': 104<br/>'''[[PE]]''': 102
|networkid='''PC:''' 68
|entityid='''PC''': ghast fireball
| size = Height: 0.98 Blocks<br>Width: 0.98 Blocks
}}

{{main|Falling Block}}

When there is no supporting block below an anvil, the anvil falls in the same way [[sand]], [[gravel]], [[concrete powder]], and [[dragon egg]]s fall. A placed anvil cannot be pushed or pulled by [[piston]]s,{{only|java}} but a falling anvil can be pushed (though cannot be pulled), as it is an [[entity]]. This is different {{in|be}} where anvils can be pushed and pulled by pistons. Anvils make a metallic clang sound when they land.

A falling anvil damages any player or mob that it falls on. The damage amount depends on fall distance: {{hp|2}} per block fallen after the first (e.g., an anvil that falls 4 blocks deals {{hp|6}} damage). The damage is capped at {{hp|40}}, no matter how far the anvil falls. Wearing a [[helmet]] reduces the damage by {{frac|1|4}}, but this costs twice as much durability on the helmet as on other armor pieces. When a player dies by an anvil falling on them, the [[death message]] '''"<''player''> was squashed by a falling anvil"''' appears. However, if a player is merely touched by a falling anvil entity, no damage is dealt unless the falling anvil becomes an anvil block in the same block where the player is located.

If an anvil falls onto a block with a solid top surface, but the same block it is in cannot be replaced ([[torch]], [[slab]], etc.), it breaks and drops as an [[item (entity)|item]].

An anvil can fall into the void if there is a straight path to it.

=== Maps ===
{{main|Map}}
{{IN|be}}, an anvil can be used instead of a [[crafting table]] to zoom a map out, to clone a map, or to place a player position marker on a map.
{{:Map/BE}} However, with the introduction of the [[cartography table]], this feature became dispensable.

=== Becoming damaged ===
With each use, an anvil has a 12% chance to become damaged – degrading one stage at a time, first becoming chipped, then damaged, then eventually destroyed. An anvil typically survives for 25 uses on average or approximately one use per 1.24 iron ingots used in crafting the anvil.

An anvil can be damaged and destroyed from falling. If it falls from a height greater than one block, the chance of degrading by one stage is 5% × the number of blocks fallen.

The damage state does not affect the anvil's function, but only anvils of the same damage state can stack in inventory.

When an anvil is destroyed, the player automatically leaves the anvil GUI and it disappears.

== Creative mode ==
In [[Creative|creative mode]], the anvil functions a little differently than other [[game mode]]s:

* Any repair/enchant/rename operation may be done, regardless of the player's experience level.
** The experience cost is not taken from the player.
* The repair cost of tools ''does'' still increase.
** It will keep doubling with each repair, past the usual limit of 39 levels.
** When it reaches the capacity of signed 32-bit integers, no repair cost is shown and the "product" item cannot be taken out of the anvil. Tools in this state also cannot be renamed or enchanted.
* Anvils are not damaged on use.

== Sounds ==
=== Generic ===
{{Sound table/Block/Anvil}}

=== Unique ===
{{edition|java}}:
{{Sound table
|sound=Anvil destroy.ogg
|subtitle=Anvil destroyed
|source=block
|description=When an anvil is destroyed
|id=block.anvil.destroy
|translationkey=subtitles.block.anvil.destroy
|volume=1.0
|pitch=0.9-1.0
|distance=16}}
{{Sound table
|sound=Anvil land.ogg
|subtitle=Anvil landed
|source=block
|description=When an anvil lands and survives
|id=block.anvil.land
|translationkey=subtitles.block.anvil.land
|volume=0.3
|pitch=0.9-1.0
|distance=16}}
{{Sound table
|sound=Anvil use.ogg
|subtitle=Anvil used
|source=block
|description=When an anvil is used
|id=block.anvil.use
|translationkey=subtitles.block.anvil.use
|volume=1.0
|pitch=0.9-1.0
|distance=16
|foot=1}}

{{edition|bedrock}}:
{{Sound table
|type=bedrock
|sound=Anvil destroy.ogg
|source=block
|description=When an anvil is broken by using it
|id=random.anvil_break
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Anvil land.ogg
|source=block
|description=When an anvil lands and survives
|id=random.anvil_land
|volume=0.5
|pitch=0.8-1.0}}
{{Sound table
|sound=Anvil use.ogg
|source=block
|description=When an anvil is used and survives
|id=random.anvil_use
|volume=0.6
|pitch=1.0
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showblocktags=y
|showitemtags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Anvil
|spritetype=block
|nameid=anvil
|blocktags=anvil
|itemtags=anvil}}
{{ID table
|displayname=Chipped Anvil
|spritetype=block
|nameid=chipped_anvil
|blocktags=anvil
|itemtags=anvil}}
{{ID table
|displayname=Damaged Anvil
|spritetype=block
|nameid=damaged_anvil
|blocktags=anvil
|itemtags=anvil
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|generatetranslationkeys=y
|displayname=Anvil
|spritetype=block
|nameid=anvil
|id=145
|translationkey=tile.anvil.intact.name,tile.anvil.slightlyDamaged.name, tile.anvil.veryDamaged.name
|foot=1}}

=== Block states ===
{{see also|Block states}}

{{/BS}}

=== Falling block entity ===
{{main|Falling Block}}
{{:Falling Block/ED}}

== Achievements ==
{{Load achievements|Organizational Wizard}}

== History ==
{{History|java indev}}
{{History||February 5, 2010|link=https://notch.tumblr.com/post/372480972/you-can-now-change-the-difficulty-from-the-options|Anvils were mentioned by [[Notch]].}}
{{History|java}}
{{History||October 7, 2012|link={{tweet|Dinnerbone|254689806309797888}}|[[Dinnerbone]] tweets the first images of the anvil's interface.}}
{{History||October 10, 2012|link={{tweet|Dinnerbone|255956096693440512}}|[[File:Anvil (N) (pre-release).png|32px]] Dinnerbone tweets the first screenshot of the anvil.}}
{{History||1.4.2|snap=12w41a|[[File:Anvil (N) JE1 BE1.png|32px]] [[File:Chipped Anvil (N) JE1 BE1.png|32px]] [[File:Damaged Anvil (N) JE1 BE1.png|32px]] Added anvils. All anvil damage levels are available in the Creative inventory.
|Anvils currently require one [[iron ingot]] and six [[block of iron|blocks of iron]]:
{{Crafting
|A1=Block of Iron
|B1=Block of Iron
|C1=Block of Iron
|B2=Iron Ingot
|A3=Block of Iron
|B3=Block of Iron
|C3=Block of Iron
|Output= Anvil
|ignoreusage=1
}}}}
{{History|||snap=12w42a|Anvils now have an easier crafting recipe.
{{Crafting
|A1=Block of Iron
|B1=Block of Iron
|C1=Block of Iron
|B2=Iron Ingot
|A3=Iron Ingot
|B3=Iron Ingot
|C3=Iron Ingot
|Output=Anvil
}}
|It is now possible to repair [[tool]]s using anvils, by using more of the material it is made of (such as adding [[diamond]]s to a nearly broken [[diamond pickaxe]]). 
|[[Item]]s that are renamed now have item names that appear as italic text or orange text in Console Edition.
|The ''# Levels'' information inside anvils has been renamed to ''Enchantment cost''.}}
{{History|||snap=1.4|Added new [[sound]]s for the anvil.
|The level cap for anvils for creative mode have been removed.}}
{{History||1.4.6|snap=12w49a|[[Enchanted book]]s have been added, which can be used only with the anvil.}}
{{History|||snap=12w50a|[[Enchanting]] non-[[tool]]s with enchanted books using the anvil now works only in [[creative]] mode.
|[[Silk Touch]] can now be applied to [[shears]] by using the anvil, meaning [[cobweb]]s can now be harvested.}}
{{History||1.5|snap=13w02a|[[Mob]]s spawned from renamed [[spawn egg]]s, from using the anvil, have the name of their spawn egg, and their names appear in the death message of them killing a [[player]].
|Mobs that are spawned from renamed spawn eggs, from using the anvil, can now display their custom name as nametag using an NBT tag.
|[[Brewing stand]]s, [[chest]]s, [[dispenser]]s, [[enchantment table]]s, [[furnace]]s and [[trapped chest]]s that are renamed using anvils now display their new name in their GUI where the normal name used to appear.}}
{{History|||snap=13w04a|Mobs now show the name given to them (either by renaming their [[spawn egg]] using an anvil or by external editors) above their head when the [[player]] looks directly at them within hitting range.}}
{{History||1.6.1|snap=1.6|Renaming a [[spawn egg]] "[[Dinnerbone]]" or "[[Grumm]]" using an anvil now causes the [[mob]] to spawn upside down (this also works with renaming [[name tag]]s).}}
{{History||1.7.4|snap=13w48b|Renaming a [[sheep]] [[spawn egg]] to {{code|jeb_}} using an anvil now causes the [[sheep]] to spawn with multicolored wool (this also works with renaming name tags).}}
{{History||1.8|snap=14w02a|The costs of using anvils have been reduced to balance out with the new [[enchanting]] system.
|Renaming [[item]]s using anvils now costs only 1 level.
|Repairing costs using anvils have been reduced, 1 level per raw material or sacrifice regardless of durability restored.
|Extra costs for repairing an [[enchanting|enchanted]] [[tool]] using anvils have been eliminated. Costs for combining enchantments have been reduced.
|Repairing costs while using anvils can no longer be kept down by renaming [[item]]s.}}
{{History|||snap=14w04a|Prior work cost increase while using anvils has been changed from linear (1 per repair) to exponential (times 2 plus 1 per repair).
|Repairing with a "sacrifice" while using anvils now costs 2 levels rather than only 1.}}
{{History|||snap=14w10a|[[File:Anvil (N) JE2.png|32px]] [[File:Chipped Anvil (N) JE2.png|32px]] [[File:Damaged Anvil (N) JE2.png|32px]] The models of anvil have been changed.}}
{{History||1.9|snap=15w42a|Renaming an [[item]] while using anvils no longer incurs a [[Anvil mechanics#Prior Work penalty|prior work penalty]].}}
{{History||1.11|snap=16w32a|Anvils now give [[sound]]s when they break.}}
{{History|||snap=16w35a|Renamed items from anvils now keep their name when picked back up.}}
{{History|||snap=16w39a|A damaged anvil now generates in [[woodland mansion]]s.}}
{{History||1.11.1|snap=release|Anvils no longer allow [[enchanted book]]s to apply to [[item]]s, if no change in [[enchanting|enchantments]] would take effect. This can occur if all enchantments on the [[book]] are incompatible with existing enchantments on the item – or if the enchanted book has no enchantments.}}
{{History||1.13|snap=17w47a|The different anvil damage block states for the {{code|anvil}} ID have been split up into their own IDs.
|"Slightly Damaged Anvil" and "Very Damaged Anvil" renamed to "Chipped Anvil" and "Damaged Anvil", respectively.
|Prior to [[1.13/Flattening|''The Flattening'']], this [[block]]'s numeral ID was 145.}}
{{History||1.14|snap=18w43a|[[File:Anvil (N) JE3.png|32px]] [[File:Chipped Anvil (N) JE3.png|32px]] [[File:Damaged Anvil (N) JE3.png|32px]] The textures of anvils have been changed.}}
{{History||1.17|snap=21w19a|The maximum length of names in the anvil UI has been increased from 35 to 50.}}
{{History||1.18|snap=Pre-release 5|The texture of GUI hammer has been changed.}}
{{History||1.20|snap=Pre-release 5|Falling anvils no longer destroy [[item (entity)|item entities]].<ref>{{bug|MC-120158
||Anvils and other falling_blocks with HurtEntities set to true kill items and xp orbs|Fixed}}</ref>}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Anvil (N) JE1 BE1.png|32px]] [[File:Chipped Anvil (N) JE1 BE1.png|32px]] [[File:Damaged Anvil (N) JE1 BE1.png|32px]] Added anvils. All anvil damage levels are available in the Creative inventory.}}
{{History||v0.14.0|snap=build 1|Anvils are now needed to add the markers onto [[map]]s by putting a map and a [[compass]] in.}}
{{History||v0.15.0|snap=build 1|Anvils can now be moved by [[piston]]s.}}
{{History|pocket}}
{{History||?|Renamed [[item]]s using anvils now keep their name when picked back up.}} 
{{History||1.1.0|snap=alpha 1.1.0.0|Very damaged anvils now generate in [[woodland mansion]]s.}}
{{History|bedrock}}
{{History||?|[[File:Broken Anvil (N) BE1.png|32px]] Added broken anvils.}}
{{History||1.2.13|snap=beta 1.2.13.5|[[File:Anvil (N) BE2.png|32px]] [[File:Chipped Anvil (N) BE2.png|32px]] [[File:Damaged Anvil (N) BE2.png|32px]] Changed models of anvils. The models of anvils now also use top texture on top face of the raised portion. Mirrored textures vertically on sides.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Anvil (N) BE3.png|32px]] [[File:Chipped Anvil (N) BE3.png|32px]] [[File:Damaged Anvil (N) BE3.png|32px]] [[File:Broken Anvil BE2.png|32px]] The textures of anvils have been changed.}}
{{History||1.20.30|snap=beta 1.20.30.20|Anvils now use the <code>minecraft:cardinal_direction</code> [[block state]] instead of <code>direction</code>.}}

{{History|console}}
{{History||xbox=TU14|xbone=CU1|ps=1.05|wiiu=Patch 1|switch=1.0.1|[[File:Anvil (N) JE1 BE1.png|32px]] [[File:Chipped Anvil (N) JE1 BE1.png|32px]] [[File:Damaged Anvil (N) JE1 BE1.png|32px]] Added anvils. Unlike other editions, only the undamaged anvil can be obtained inside the [[Creative inventory]].}}
{{History||xbox=TU31|xbone=CU19|ps=1.22|wiiu=Patch 3|Anvil repairing has been rebalanced as per [[Java Edition 1.8|Java 1.8]] changes.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Anvil (N) JE3.png|32px]] [[File:Chipped Anvil (N) JE3.png|32px]] [[File:Damaged Anvil (N) JE3.png|32px]] The textures of anvils have been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Anvil (N) JE1 BE1.png|32px]] [[File:Chipped Anvil (N) JE1 BE1.png|32px]] [[File:Damaged Anvil (N) JE1 BE1.png|32px]] Added anvils. All anvil damage levels are available in the Creative inventory.}}
{{History|foot}}

<gallery>
File:Anvil1.png|A series of screenshots showing the item repair interface.<ref>{{tweet|dinnerbone|254689806309797888}}</ref>
File:Anvil2.png
File:Anvil3.png
File:Anvil4.png
File:Anvil5.png
File:Anvil6.png
File:Anvil 1st image.png|The first screenshot of the anvil.<ref>{{tweet|dinnerbone|255956096693440512}}</ref>
</gallery>

== Issues ==
{{Issue list}}

== Trivia ==
*If placed on top of exploding [[TNT]] blocks, the explosion does not affect the surrounding area. This is because the anvil falls into the space the TNT entity is occupying, and since the TNT's explosion power is not high enough to destroy the anvil, no blocks are destroyed.
*Before they were added to ''Minecraft'', anvils were already present in ''[[Minicraft]]''.

== Gallery ==
<gallery>
PE Anvil GUI.png|The old anvil GUI in ''Pocket Edition'' (now [[Bedrock Edition]])
AnvilDamage.png|Top down view of the three stages of anvils. From left to right: anvil, chipped anvil, damaged anvil
Anvil levels.png|3D view of the three stages of anvils. From left to right: anvil, chipped anvil, damaged anvil
</gallery>

== References ==
{{Reflist}}

== External links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--anvil Taking Inventory: Anvil] – Minecraft.net on November 26, 2020

{{Blocks|Utility}}
{{Entities}}

[[Category:Utility blocks]]
[[Category:Generated structure blocks]]
[[Category:Manufactured blocks]]

[[cs:Kovadlina]]
[[de:Amboss]]
[[es:Yunque]]
[[fr:Enclume]]
[[hu:Üllő]]
[[it:Incudine]]
[[ja:金床]]
[[ko:모루]]
[[nl:Aambeeld]]
[[pl:Kowadło]]
[[pt:Bigorna]]
[[ru:Наковальня]]
[[tr:Örs]]
[[th:ทั่ง]]
[[uk:Ковадло]]
[[zh:铁砧]]
