{{about|the mob|the food items|Raw Cod|and|Cooked Cod}}
{{Entity
| title = Cod
| image = <gallery>
Cod.gif|Cod
Cod BE.gif|Cod (BE)
</gallery>
|invimage=Cod Spawn Egg
|invimage2=Bucket of Cod
| health = {{hp|3}}
| behavior = Passive
| classification = [[Animal]]<br>[[Aquatic]]
| size = '''{{IN|Java}}:'''<br>
Height: 0.3 Blocks<br>Width: 0.5 Blocks

'''{{IN|Bedrock}}:'''<br>
Height: 0.3 Blocks<br>Width: 0.6 Blocks
| spawn = {{BiomeLink|Cold Ocean}} <br> {{BiomeLink|Deep Cold Ocean}} <br> {{BiomeLink|Lukewarm Ocean}} <br> {{BiomeLink|Deep Lukewarm Ocean}} <br> {{BiomeLink|Ocean}} <br> {{BiomeLink|Deep Ocean}}
| usableitems = 
{{drop|Item|Water Bucket}}
}}
'''Cod''' are common [[Bucket of aquatic mob|bucketable]] aquatic passive [[mob]]s found in [[ocean]]s, and a source of [[Raw Cod|raw cod]] and, occasionally, [[Bone|bones]]{{Only|Bedrock}} or [[Bone Meal|bone meal]].{{Only|Java}}

== Spawning ==

=== Java Edition ===
Cod spawn underwater in normal, cold, and lukewarm oceans, and their deep variants, in groups of 3-6, subject to [[Fish#Spawning|fish spawning requirements]].

=== Bedrock Edition ===
Cod spawn underwater 12-32 blocks away from the player in normal, cold, frozen, lukewarm oceans, and their deep variants, in groups of 4-7. In addition, cod spawn only on the surface; that is, there must not be a spawnable block above the spawn location with a non-solid block on top.

== Drops ==
Cod drop the following upon death:

* 1 {{ItemLink|raw cod}}, or 1 {{ItemLink|cooked cod}} if killed while on [[fire]]. This drop is unaffected by [[Looting]].<ref>{{bug|MC-212795||Salmon & Fish mobs are not affected by Looting}}</ref>
* 1 {{ItemLink|bone meal}} (5% chance){{only|java}}
* 1–2 {{ItemLink|bone}}s (25% chance){{only|bedrock}}
* {{xp|1|3}} experience when killed by a [[player]] or tamed [[wolf]].

== Behavior ==
Cod tend to swim in schools (a maximum of nine cod per school).

The player may collect a cod by {{control|using}} a [[water bucket]] on it, which gives the player a [[bucket of fish]]. Cod placed with buckets do not despawn naturally. When that fish bucket is {{control|used}} on a block, it empties the bucket, placing water with the cod swimming in it.

An empty bucket may be used as well.{{only|bedrock}}

=== Weaknesses ===
A cod cannot survive outside of water. Outside of water, they flip around on their sides like [[guardians]] for a while trying to get back into the water until, after 10 seconds of time, they start taking suffocation damage and die. {{IN|bedrock}}, fish out of water rotate while flipping. They cannot swim or breathe in cauldron water.<ref>{{bug|MC-126819}} – "fish bouncing and suffocating on top of the cauldron which fills with water" resolved as "Won't Fix"</ref> They can swim in, but cannot survive in waterlogged blocks, most noticeably waterlogged slabs and stairs.

{{IN|java}}, cod are vulnerable to weapons that have the [[Impaling]] enchantment, which also affects other fish and aquatic mobs except drowned.

== Sounds ==
{{Edition|Java}}:<br>
Cod use the Friendly Creatures sound category for entity-dependent sound events.
{{Sound table
|sound=-
|subtitle=''None''
|source=neutral
|description=Randomly
|id=entity.cod.ambient
|translationkey=-
|volume=1.0
|pitch=0.8-1.2
|distance=16}}
{{Sound table
|rowspan=2
|sound=Fish hurt1.ogg
|sound2=Fish hurt2.ogg
|sound3=Fish hurt3.ogg
|sound4=Fish hurt4.ogg
|subtitle=Cod dies
|source=neutral
|description=When a cod dies
|id=entity.cod.death
|translationkey=subtitles.entity.cod.death
|volume=1.0
|pitch=0.8-1.2
|distance=16}}
{{Sound table
|subtitle=Cod hurts
|source=neutral
|description=When a cod is damaged
|id=entity.cod.hurt
|translationkey=subtitles.entity.cod.hurt
|volume=1.0
|pitch=0.8-1.2
|distance=16}}
{{Sound table
|sound=Fish flop1.ogg
|sound2=Fish flop2.ogg
|sound3=Fish flop3.ogg
|sound4=Fish flop4.ogg
|subtitle=Cod flops
|source=neutral
|description=While a cod is on land
|id=entity.cod.flop
|translationkey=subtitles.entity.cod.flop
|volume=0.3
|pitch=0.8-1.2
|distance=16}}
{{Sound table
|sound=Fish swim1.ogg
|sound2=Fish swim2.ogg
|sound3=Fish swim3.ogg
|sound4=Fish swim4.ogg
|sound5=Fish swim5.ogg
|sound6=Fish swim6.ogg
|sound7=Fish swim7.ogg
|subtitle=MC-200508
|source=neutral
|description=While a cod is swimming
|id=entity.fish.swim
|translationkey=-
|volume=0.0-1.0 <ref group=sound name=speedvolume>The fish's momentum, with the horizontal axes' velocities multiplied by 0.2 (capped at 1.0)</ref>
|pitch=0.6-1.4
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|rowspan=2
|sound=Fish hurt1.ogg
|sound2=Fish hurt2.ogg
|sound3=Fish hurt3.ogg
|sound4=Fish hurt4.ogg
|source=neutral
|description=When a cod dies
|id=mob.fish.hurt
|volume=1.0
|pitch=0.8-1.2}}
{{Sound table
|source=neutral
|description=When a cod is damaged
|id=mob.fish.hurt
|volume=1.0
|pitch=0.8-1.2}}
{{Sound table
|sound=Fish flop1.ogg
|sound2=Fish flop2.ogg
|sound3=Fish flop3.ogg
|sound4=Fish flop4.ogg
|source=neutral
|description=While a cod is on land
|id=mob.fish.flop
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Fish swim1.ogg
|sound2=Fish swim2.ogg
|sound3=Fish swim3.ogg
|sound4=Fish swim4.ogg
|sound5=Fish swim5.ogg
|sound6=Fish swim6.ogg
|sound7=Fish swim7.ogg
|source=neutral
|description=While a cod is swimming
|id=mob.fish.step
|volume=0.15
|pitch=1.0
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showentitytags=y
|generatetranslationkeys=y
|displayname=Cod
|spritetype=entity
|nameid=cod
|entitytags=axolotl_always_hostiles
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|generatetranslationkeys=y
|displayname=Cod
|spritetype=entity
|nameid=cod
|id=112
|foot=1}}

=== Entity data ===
Cod have entity data associated with them that contain various properties.

{{el|java}}:
{{main|Entity format}}
{{/ED}}

{{el|bedrock}}:
: See [[Bedrock Edition level format/Entity format]].

== Achievements ==
{{load achievements|I am a Marine Biologist}}

== Advancements ==
{{load advancements|Tactical Fishing;It Spreads}}

== History ==
{{History|java alpha}}
{{History||June 28, 2010|link=wordofnotch:746938105|[[Notch]] mentioned that [[fish]] might be a feature of coral, if he were able to add coral: "... I do know that the corals will have tiny fish particles around them."}}
{{History||October 4, 2010|link=wordofnotch:1243370641|Fish were a passive [[mob]] that [[Notch]] showed interest in adding. In the promotional graphic for the [[Halloween Update]], Notch indicated he would add fish. However, they were added only as an [[item]]; there was no code for a fish mob.}}
{{History|java}}
{{History||October 5, 2012|link={{tweet|Dinnerbone|253954758489038848}}|Fish were jokingly teased in the fake snapshot [[12marc40awesome]], along with [[coral]] and "fish blocks".}}
{{History||April 13, 2013|link={{reddit|s7ri6/i_am_jon_k%C3%A5gstr%C3%B6m_developer_of_minecraft_ask_me|c4bs6d1|context=3}}|When [[Jon Kågström]] was asked in his AMA on Reddit, "What mob would you like to implement into the game?" He responded, "I would like to add birds, fish and tree animals to make it more alive. However this will take some time before it can be done."}}
{{History||July 31, 2013|link={{reddit|xfzdg/i_am_markus_persson_aka_notch_creator_of}}|During [[Notch]]'s AMA on [[wikipedia:Reddit|Reddit]], when asked about what happened to his plans of adding fish as a [[mob]], he responded, "Oh yeah, the fish!"}}
{{History||1.13|snap=18w08b|[[File:Cod.gif|42px]] Added cod as a mob.}}
{{History|||snap=18w15a|Cod now [[drops|drop]] the cooked version of their [[item]] drops, if killed while on [[fire]].}}
{{History||1.13.1|snap=18w31a|Cod now have a 5% chance of dropping [[bone meal]] when killed.}}
{{History||1.18|snap=21w40a|Cod now only spawn between y{{=}}50 and y{{=}}64.}}

{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|[[File:Cod BE.gif|42px]] Added cod.}}
{{History||1.13.0|snap=beta 1.13.0.9|Cod now drop [[experience]] when killed.}}
{{History||1.16.100|snap=beta 1.16.100.52|Cod now [[drops|drop]] the cooked version of their [[item]] drops, if killed while on [[fire]].}}
{{History||1.18.0|snap=beta 1.18.0.21|Cod now only spawn between y{{=}}50 and y{{=}}64.}}
{{History||1.19.10|snap=beta 1.19.10.23|The max health of cod has been changed to {{hp|3}}.}}

{{History|console}}
{{History||xbox=TU69|ps=1.76|wiiu=Patch 38|[[File:Cod BE.gif|42px]] Added cod.}}

{{History|education}}
{{History||1.4.0|[[File:Cod BE.gif|42px]] Added cod.}}
{{History|foot}}

== Issues ==
{{issue list|Cod}}

== Trivia ==
* A [[wikipedia:cod|cod]] in real life are any species of fish that belong in the genus [[wikipedia:Gadus|Gadus]], except for [[wikipedia:Alaska pollock|Alaska pollock]] which is the same genus but not called "cod".
**Interestingly, cod in Minecraft have two dorsal fins while all real members of the genus Gadus have three dorsal fins.

== Gallery ==
<gallery>
School of cod.png|A school of 6 cod swimming in an [[ocean]].
Pufferfish mob.png|A fully inflated [[pufferfish]], with six deflated pufferfish and a school of cod behind it.
Coral reef at night.png|An ocean with some fish visible.
Land Fish.png|A dying cod next to a pufferfish that is also taking damage due to the absence of [[water]] around them. 
Ocean life.png|Cod and [[tropical fish]], along with a [[turtle]] and [[squid]].
ArgoMajor Fish.jpg|First image of fish mobs in ''Bedrock Edition''.
</gallery>

== See also ==
* [[Salmon]]
* [[Tropical Fish]]
* [[Pufferfish]]

== References ==
{{Reflist}}

{{Entities}}

[[Category:Passive mobs]]
[[Category:Aquatic mobs]]
[[Category:Animal mobs]]

[[cs:Treska]]
[[de:Kabeljau]]
[[es:Bacalao]]
[[fr:Poisson (créature)]]
[[ja:タラ]]
[[ko:대구]]
[[hu:Hal]]
[[nl:Vis (wezen)]]
[[pl:Ryba (mob)]]
[[pt:Bacalhau]]
[[ru:Треска]]
[[th:Fish (mob)]]
[[uk:Тріска]]
[[zh:鳕鱼]]
