mojira.dev
MC-204760

You cannot tempt or tame cats or ocelots using cooked cod or salmon

The Bug:

You cannot tempt or tame cats or ocelots using cooked cod or salmon.

Since you can tempt/tame cats and ocelots using raw cod and raw salmon, it seems quite illogical that this same concept cannot be seen with the cooked variants of these items.

Steps to Reproduce:

  1. Summon a cat or ocelot and obtain some cooked cod or salmon.

  2. Attempt to tame the cat or ocelot using the cooked item.

  3. Take note as to whether or not you can tempt or tame cats or ocelots using cooked cod or salmon.

Observed Behavior:

You cannot tempt or tame cats or ocelots using cooked cod or salmon.

Expected Behavior:

You would be able to tempt and tame cats and ocelots using cooked cod and salmon.

Code Analysis:

Code analysis by @unknown can be found below.

The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.

net.minecraft.world.entity.animal.Cat.java

public class Cat extends TamableAnimal {
   ...
   private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON);
   ...

net.minecraft.world.entity.animal.Ocelot.java

public class Ocelot extends Animal {
   ...
   private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON);
   ...

If we look at the above classes, we can see that the only items that cats and ocelots are tempted by are cod and salmon. Because of this, both cooked cod and cooked salmon cannot be used to tempt/tame cats and ocelots, therefore resulting in this problem occurring.

Fix:

Simply adding both cooked cod and cooked salmon to the list of items that cats and ocelots are tempted by, will resolve this problem.

net.minecraft.world.entity.animal.Cat.java

...
   private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON, Items.COOKED_COD, Items.COOKED_SALMON);
   ...

net.minecraft.world.entity.animal.Ocelot.java

...
   private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON, Items.COOKED_COD, Items.COOKED_SALMON);
   ...

Linked issues

Attachments

Comments 10

Can confirm for 20w45a

It seems they can't be tamed with Tropical Fish either

This is intended. you can only tame cats with fish that have the word "raw" in them.

 This is intended, you can only use 'raw' fish.

Do you have an official source from Mojang to prove this statement?

Duh, youre not supposed to be able to. Thats not a bug

Maybe it is a bug and has just been around for so long that it seems intentional

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Avoma

(Unassigned)

Confirmed

Mob behaviour

cat, cooked_cod, cooked_salmon, ocelot

1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, ..., 1.19.4, 1.20, 1.20.1, 1.20.5, 1.21

Retrieved