Cod is a passive fish that swims in schools. The living mob uses minecraft:cod in both editions. The mob and its food item are registered separately. In Bedrock the food item also uses minecraft:cod in commands, while older identifiers minecraft:fish and minecraft:cooked_fish still appear in the game's loot and furnace files. Java 1.13 release notes · Bedrock 1.4.0 release notes · Bedrock cod entity · Bedrock item metadata · Bedrock furnace mapping
Look for cod schools in ocean water. Java 26.3 biome data lists cod in ordinary, cold and lukewarm oceans. The Java 1.18 release notes give a spawn height of Y 50–64. Bedrock's spawn file requires underwater ocean locations, excludes the warm biome tag and specifies groups of 4–7. Java ordinary ocean · Java cold ocean · Java lukewarm ocean · Java 1.18 release notes · Bedrock spawn rules
Cod swim together and need water to survive. To move one, use a water bucket on a living cod. Use the filled bucket at the destination to release the fish with a water source. Bedrock cod entity · Mojang's bucket guide
Added in 1.13. The 26.3 loot data includes a bone meal chance and checks Fire Aspect separately from the fish's burning state.
Bedrock Edition
Added in 1.4.0. The vanilla entity definition sets maximum health at 3 HP (1½ hearts) and defines schooling behavior. Its additional item roll is for bones.