Anvil file format

**This feature is exclusive to  *Java Edition*.**

For the blocks, see Anvil.

**Anvil** is a file storage format. It brings a list of changes and improvements over from the previous file format, Region. It was implemented in snapshot 12w07a for release in Java Edition 1.2.1.

## Changes from MCRegion

The only changes from MCRegion to Anvil were in the Chunk format; the Region file format is still used, but labeled as Anvil. The Anvil format introduced these changes to the Chunk format:

* Maximum build height has been increased to 256 (from 128).
* Empty sections of the world are not loaded into memory or saved to disk.
* The maximum Block ID has been increased to 4096 (was 256) by adding a 4-bit data layer (similar to how meta data is stored). The rest of Minecraft's code was not prepared to take advantage of this until terrain.png was removed and resource locations were added.
* Block ordering has been changed from XZY to YZX in order to improve compression.
* Packets for sending chunks have been optimized (a chunk without air is smaller than in the same chunk in the old format, and a chunk with lots of air is even smaller).
* Biomes are saved per X,Z column, rather than being calculated on the fly, which means they can be altered by tools; this is useful for map makers. It also prevents bugs where features don't match the biome after changing the terrain algorithm. (Also known as "Biome Shifting")

### Further information

Versions from 12w07a to 1.17.1 automatically convert worlds to the new format, but a copy of the world files is created in the previous formats for compatibility with older game versions. The world generator has not been changed, so there is an additional 128 blocks of air above the usual terrain, making 192 blocks from sea level to the height limit.

* The 16×128×16 "Blocks", "Data", "SkyLight" and "BlockLight" tags were moved and repurposed. (see below)
* A "Sections" List tag containing Compound tags has been added with up to 16 Compound tags.
* Each section has 16×16×16 "Blocks", "Data", "SkyLight" and "BlockLight" tags.
* Each section has a "Y" Byte tag saying which section it is (note that some Y positions can be skipped). 0 is at the bottom of the world and 15 is the topmost section.
* Each section also has an optional "Add" tag, which is a DataLayer byte array just like "Data". The "Add" tag is not included in the converter since the old format never had block ids above 255. This extra tag is created whenever a block requires it, so the `getTile()` method needs to check if the array exists and then combine it with the default block data. In other words, `blockId = (add << 8) + baseId`.
* Each chunk has a 16×16 byte array with biome IDs called "Biomes". If this array is missing it is filled when the game starts, as well any -1 values in the array. The converter source provided for developers doesn't include any biome sources, however.
* Note that the old format is XZY (`(x * 16 + z) * 16 + y`) and the new format is YZX (`(y * 16 + z) * 16 + x`) (see the difference between DataLayer and OldDataLayer).
* The new format uses the extension ".mca" instead of ".mcr" (the old format is kept for safety, with the level.dat backed up as "level.dat\_mcr").
* A new NBT tag type called IntArray was added to the NBT Format (With ID 11) and is used by the "Heightmap" tag.

Additional information may be found on the Chunk format page.

## World size reduction post-conversion

Anvil world data uses a `.mca` file extension, while McRegion uses `.mcr`. The game leaves the old McRegion files after converting a world to Anvil, despite the game never using them again. To reduce the file size of backups, the old McRegion files may be deleted. To do this, perform the following steps:

* Windows:
	1. Open the command prompt (press `⊞ Win` and `R` together, type `cmd`, and press `↵ Enter`)
	2. Run the following command: `del /f /q "[path to world folder]\region\\*.mcr"`

* Linux and macOS:
	1. Open the terminal
	2. Run the following command: `rm -f "[path to world folder]"/region/\*.mcr`

## History

```
}}

'''Raw chicken''' is a [[food]] item that can be eaten by the [[player]]. It can be cooked in a [[furnace]], [[smoker]], or a [[campfire]] to make [[cooked chicken]].

==Obtaining==

===Mob loot ===

Upon death, an adult [[chicken]] drops 1 raw chicken. The maximum is increased by 1 per level of [[Looting]], for a maximum of 1-4 with Looting III. Chickens that die while on [[fire]] drop [[cooked chicken]] instead.

===Cat gifts===
{{main|Cat#Gifts}}

Tamed [[cat]]s have a 70% chance to give the [[player]] a gift as they wake up from a [[bed]], and the gift has a 16.13% chance to be raw chicken.

==Usage==

=== Food===

<nowiki>*This has a similar effect as [[Rotten Flesh]].

===Smelting ingredient===

{{Smelting
}}

===Wolves===

Raw chicken can be used to [[breed]] and heal tamed [[wolves]], lead them around, and make baby tamed wolves grow up faster by 10% of the remaining time.

Wolves are at no risk of food poisoning.

===Trading===
Novice-level Butcher villagers have a {{frac|1|3}} chance to buy 14 raw chicken for an emerald.{{only|bedrock}}

Novice-level Butcher villagers have a 50% chance of offering to buy 14 raw chicken for an emerald.{{only|java}}

==Sounds==
{{Sound table/Entity/Food}}

==Data values==

===ID ===
{{edition|java}}:
{{ID table

{{edition|bedrock}}:
{{ID table

==Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

==Video==
<div style="text-align:center">{{yt|ux362Ae8Llc}}</div>

==History==

{{History|java beta}}
{{History|java}}

{{History|pocket alpha}}
{{History|pocket}}
{{History|bedrock}}

{{History|console}}
{{History|PS4}}

{{History|new3DS}}
{{History|foot}}

==Issues==

{{issue list}}

==Gallery ==
<gallery>
Beta 1.8 Dev Chicken 2.png|First image of raw chicken.
</gallery>

==References==
{{reflist}}

{{Items}}

[[de:Rohes Hühnchen]]
[[es:Pollo crudo]]
[[fr:Poulet cru]]
[[hu:Nyers csirkehús]]
[[ja:生の鶏肉]]
[[ko:익히지 않은 닭고기]]
[[nl:Rauwe kip]]
[[pl:Surowy kurczak]]
[[pt:Frango cru]]
[[ru:Сырая курятина]]
[[th:ไก่ดิบ]]
[[zh:生鸡肉]]
[[Category:Food]]
[[Category:Renewable resources]]</li><li>[[Cooked Porkchop|Cooked Porkchop]]<br/>{{Item
}}

'''Cooked porkchop''' is a [[food]] [[item]] that can be eaten by the [[player]].

== Obtaining ==
{{see also|Tutorials/Animal farming|title1=Animal farming}}

Cooked porkchops can be obtained by cooking [[raw porkchop]]s or by [[trading]] with butchers, and is a [[drops|drop]] from [[pig]]s and [[hoglin]]s that die while on [[fire]].

=== Mob loot ===

==== Pigs ====

Adult [[pig]]s drop 1–3 cooked porkchop if killed while on fire. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 1-6 with Looting III.

==== Hoglins ====

Adult [[hoglin]]s drop 2–4 cooked porkchop if killed while on fire. The maximum amount is increased by 1 per level of Looting, for a maximum of 7 with Looting III.

=== Cooking ===

[[Raw porkchop]] can be cooked in a [[furnace]], [[smoker]], or [[campfire]]. Each piece of cooked porkchop removed from a furnace output slot gives 0.35 [[experience]] (22.4 experience per stack).
{{Smelting
}}

=== Trading ===
{{IN|java}}, apprentice-level butcher [[villager]]s have a {{frac|2|3}} chance of selling 5 cooked porkchop for 1 [[emerald]].

Butcher villagers may give players with the [[Hero of the Village]] effect a cooked porkchop.{{only|java}}

{{IN|bedrock}}, apprentice-level butcher villagers have a 25% chance to sell 5 cooked porkchop for 1 emerald.

=== Chest loot ===
{{LootChestItem|cooked-porkchop}}

== Usage ==

=== Food ===
{{see also|Tutorials/Hunger management|title1=Hunger management}}

To eat cooked porkchop, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|8}} [[hunger]] and 12.8 [[Hunger#Mechanics|saturation]].

=== Wolves ===

Cooked porkchops can be used to [[breeding|breed]] and heal tamed [[wolf|wolves]], lead them around, and make baby tamed wolves grow up faster by 10% of the remaining time.

=== Piglins ===
[[Piglin]]s pick up any cooked porkchops in their [[item (entity)|item]] form. However, they do not eat it.

==Sounds==
{{Sound table/Entity/Food}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table

{{edition|bedrock}}:
{{ID table

== Achievements ==

{{load achievements|Pork Chop}}

== Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

== History ==

{{History|java indev}}
{{History|java alpha}}
{{History|java beta}}
{{History|java}}

{{History|pocket alpha}}
{{History|pocket}}
{{History|bedrock}}

{{History|console}}
{{History||xbox=TU5|Cooked porkchops are now stackable to 64.
{{History|PS4}}

{{History|new3DS}}
{{History|foot}}

== Issues ==
{{issue list}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--porkchop Taking Inventory: Porkchop] – Minecraft.net on February 13, 2020

{{Items}}

[[Category:Food]]
[[Category:Renewable resources]]

[[cs:Pečená kotleta]]
[[de:Gebratenes Schweinefleisch]]
[[es:Chuleta de cerdo cocinada]]
[[fr:Côtelette de porc cuite]]
[[hu:Sült sertésszelet]]
[[ja:焼き豚]]
[[nl:Gebraden varkensvlees]]
[[pl:Pieczony schab]]
[[pt:Costeleta de porco assada]]
[[ru:Жареная свинина]]
[[uk:Смажена свинина]]
[[zh:熟猪排]]</li></ul></nowiki>
```
```
{{Extension DPL}}<ul><li>[[Ink Sac|Ink Sac]]<br/>{{For|the variant dropped by Glow squids|Glow Ink Sac}}
{{Item
}}

An '''ink sac''' is an [[item]] dropped by a [[squid]] upon death used to create [[black dye]], [[dark prismarine]]{{only|BE|short=1}}, and [[Book and Quill|books and quills]].

== Obtaining ==

=== Mob loot ===

==== Squid ====
{{see also|Tutorials/Squid farming|title1=Squid farming}}

A [[squid]] drops one to three ink sacs upon death. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 1 to 6 with Looting III.

=== Fishing ===
Ink sacs can be obtained as a "junk" item from [[fishing]]. The [[Luck of the Sea]] [[enchantment]] decreases the chance.

=== Trading ===
[[Wandering trader]]s sometimes sell 3 ink sacs for an [[emerald]] {{in|bedrock}}. Apprentice level [[Trading#Librarian|librarians]] also buy 5 ink sacs for one [[emerald]].

=== Natural generation ===

{{LootChestItem|ink-sac}}

== Usage ==

=== Crafting ingredient ===

{{crafting usage}}

{{IN|bedrock}}, ink sacs can be also used in banner patterns:
{{banner crafting usage}}

=== Loom ingredient ===
{{Banner loom usage|Ink Sac}}

=== Dye ===
{{Dye usage}}
* Each type of [[Prismarine#Dark Prismarine|dark prismarine]] can be crafted using varying amounts of 8 [[Prismarine Shard#prismarine shards|prismarine shards]].

=== Trading ===

=== Signs ===
Ink sacs can be applied to [[sign]]s or [[hanging sign]]s to revert glowing text back to default.

== Sounds ==
{{edition|java}}:
{{Sound table

{{edition|bedrock}}:
{{Sound table

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table

{{edition|bedrock}}:
{{ID table

== Video ==
{{video note|Ink sacs can no longer be used as a dye in Java Edition.}}
<div style="text-align:center">{{yt|ABYCZfawO60}}</div>

== History ==
{{History|java beta}}
{{History||1.2_02|"Ink Sack" has been renamed to "Ink Sac".}}
{{History|java}}

{{History|pocket alpha}}
{{History|pocket}}
{{History|bedrock}}

{{History|console}}

{{History|New 3DS}}
{{History|foot}}

== Issues ==
{{issue list}}

== References ==
{{reflist}}

{{Items}}

[[Category:Bedrock Edition specific information]]
[[Category:Items]]
[[Category:Dyes]]
[[Category:Renewable resources]]

[[cs:Váček inkoustu]]
[[de:Tintenbeutel]]
[[es:Saco de tinta]]
[[fr:Poche d'encre]]
[[hu:Tintazsák]]
[[ja:イカスミ]]
[[ko:먹물 주머니]]
[[nl:Inktzak]]
[[pl:Torbiel z atramentem]]
[[pt:Bolsa de tinta]]
[[ru:Чернильный мешок]]
[[uk:Чорнильний мішок]]
[[zh:墨囊]]</li><li>[[Milk Bucket|Milk Bucket]]<br/>{{Item
}}

== Obtaining ==

=== Harvesting ===
Milk buckets can be obtained from [[cow]]s, [[mooshroom]]s, and [[goat]]s by pressing {{control|use}} while looking at them with an empty [[bucket]].

=== Mob loot ===
A milk bucket has a chance of dropping from a [[wandering trader]], if the trader is killed while holding it.{{only|java}}

== Usage ==

Holding {{control|use}} with a milk bucket starts the drinking sound and animation. {{IN|java}}, the animation is shown only in first-person camera mode.

When consumed, milk immediately removes all status [[effect]]s from the [[player]]. [[Fire]] is not a status effect; therefore, drinking milk doesn't extinguish a burning player.

The benefits of area status effects granted by [[beacon]]s and [[Conduit Power|conduit power]] are restored almost immediately in Bedrock Edition and after a few seconds in ''Java Edition''.

=== Crafting ingredient ===

{{crafting usage|Milk Bucket}}

== Sounds ==
{{el|je}}:
{{Sound table
{{Sound table
{{Sound table
{{Sound table
{{Sound table

{{el|be}}:
{{Sound table
{{Sound table
{{Sound table
{{Sound table
{{Sound table

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table

{{edition|bedrock}}:
{{ID table

== Achievements ==
{{load achievements|The Lie}}

== Advancements ==
{{Load advancements|Husbandry}}

== Video ==

<div style="text-align:center">{{yt|eyxea_d0b3s}}</div>

== History ==

{{History|java alpha}}
{{History||v1.0.17|Milk buckets can now be emptied.}}
{{History|java beta}}
{{History||1.2|Milk has been incorporated into the [[crafting]] recipe of [[cake]].}}
{{History||1.2_01|[[Squid]] can now be milked by right-clicking on their mouth if part of their body was exposed to [[air]] or if they were not touching another [[block]]. An easy way to accomplish this is to pull a squid with a [[fishing rod]] away from other blocks and then milk it.}}
{{History||1.3_01|Squid milking has been removed.}}
{{History|java}}
{{History|upcoming java}}

{{History|pocket alpha}}
{{History|bedrock}}

{{History|console}}
{{History|Ps4}}

{{History|New 3DS}}
{{History|foot}}

== Issues ==
{{issue list}}

== See also ==
*[[Water Bucket]]
*[[Lava]]
*[[Food]]
*[[Cake]]
*[[Honey Bottle]] (alternative to remove poison effect)
*[[Medicine]]

== Notes ==
{{fnlist}}

== References ==
{{reflist}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--milk-bucket Taking Inventory: Milk Bucket] – Minecraft.net on October 8, 2019

{{Items}}

[[Category:Food]]
[[Category:Renewable resources]]
[[Category:Tools]]

[[cs:Mléko]]
[[de:Milcheimer]]
[[es:Cubo con leche]]
[[fr:Seau de lait]]
[[hu:Tej]]
[[it:Secchio di latte]]
[[ja:ミルク入りバケツ]]
[[ko:우유 양동이]]
[[nl:Emmer melk]]
[[pl:Wiadro mleka]]
[[pt:Balde de leite]]
[[ru:Ведро с молоком]]
[[th:ถังนม]]
[[uk:Відро молока]]
[[zh:奶桶]]</li></ul>
```

## See also

* Java Edition level format
* Chunk format
* Region file format

## References

1. ↑ https://web.archive.org/web/20120302221152/https://www.mojang.com/2012/02/new-minecraft-map-format-anvil/