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.
Cod tend to swim in schools with a maximum of 9 cod per school.
The player may collect a cod by using a water bucket on it, which gives the player a bucket of cod. Cod placed with buckets do not despawn naturally. When that fish bucket is used on a block, it empties the bucket, placing water with the cod swimming in it.
Cod cannot be bred, but only spawn in designated biomes.
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 Edition, fish out of water rotate while flipping. They cannot swim or breathe in cauldron water.[1] They can swim in, but cannot survive in waterlogged blocks, most noticeably waterlogged slabs and stairs.
In Java Edition, cod are vulnerable to weapons that have the Impaling enchantment, which also affects other fish and aquatic mobs except drowned.
Kill any mob that drops experience near a sculk catalyst, with the sole exception of the ender dragon. Mobs that drop no experience are ignored for this achievement.
Kill any mob that drops experience near a sculk catalyst, with the sole exception of the ender dragon. Mobs that drop no experience are ignored for this advancement.
Armor Stand and Mannequin also count for this advancement. This is a hidden advancement, meaning that it can be viewed by the player only after completing it, regardless of if its child advancement(s), if any, have been completed.
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."
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.
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."