Fish (mob)

"You're not the only new explorer of the updated oceans, mind. We've filled the seas with new types of fish! Above is the delightful pufferfish, which filled me with delightful poison because I was too busy taking that screenshot to swim away in time :("

- Tom Stone

Fish are common passive mobs found in oceans and rivers. They come in 4 main variants: cod, salmon, puffer fish, and tropical fish.

Spawning
Cod spawn in normal, cold, and lukewarm oceans, and their deep variants.

Puffer fish and tropical fish spawn in lukewarm, warm, and deep lukewarm oceans.

Salmon spawn in cold and frozen oceans, and their deep variants. Unlike the other types of fish, they also spawn in normal and frozen rivers.

Drops
Fish drop 1 of their item form when killed: raw cod, raw salmon, pufferfish or clownfish. The drop will never be cooked, even if the fish is killed while on fire. A tropical fish will drop clownfish no matter what its type, pattern or colors are.

Behavior
Cod, salmon and tropical fish tend to swim in schools of fish (a maximum of nine cod, six salmon, and nine of the same tropical per school). Salmon are able to jump up waterfalls.

Weaknesses
None of the fish are able to survive out of water. Outside of water, they flop around for a while until eventually they die of suffocation damage. Cod, salmon and tropical fish will flip around on their sides.

Fish have a weakness to weapons that have the Impaling enchantment, which also affects squids, turtles, drowned, guardians, and elder guardians.

Defenses
Puffer fish will puff up when approached by a player, going from unpuffed, then semi-puffed, to fully puffed. Puffer fish are technically passive mobs but going near one when fully puffed will inflict the player with seven seconds of, and touching them in their puffed form will deal some damage separate from the poison.

Tropical fish varieties


When tropical fish spawn in the wild, 90% of the time they will come in one of the 22 varieties seen on the right, and the other 10% of the time their patterns, size and colors will be completely random, drawn from any of 2 shapes, 16 colors, 6 patterns, and 16 colors for the pattern. These result in 3072 naturally-occurring combinations. With commands, the player can summon tropical fish without patterns, giving a further 32 possible combinations.

Fish bucket
A fish bucket is a water bucket with a fish inside, used to transport them.

To fill a water bucket with a fish, it on a fish. Using a fish bucket will release the fish and water inside it.

The four variants of fish buckets correspond to the four variants of fish mobs. For example, a water bucket with a cod fish in it is called a cod bucket.

A fish bucket retains the data values of the fish inside it. For example, the variant of a tropical fish will not change when carried in a fish bucket.

Data values
Cod and salmon have entity data associated with them that contain various properties of the mob. Their entity IDs are  and.

Puffer fish and tropical fish have additional entity data, beyond what other fish have. Their entity IDs are  and.

The fish sizes and patterns are depicted in the following table, with white body color and dark gray pattern color.

The 22 varieties of tropical fish most commonly found throughout the world have  tag values from the following table, which also lists what color/shape/patterns come from that value.

Trivia

 * Despite its item form being named "Pufferfish", the bucket and spawn eggs refer to the respective mob as "Puffer Fish".
 * Puffer fish will puff up and poison the invisible player, and the player on peaceful difficulty, creative and spectator mode.