-
Bug
-
Resolution: Works As Intended
-
None
-
1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w08b, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Pre-release 5, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w38a, 21w39a, 21w41a, 21w43a, 1.18, 1.18.1, 22w03a, 22w05a, 22w06a, 1.18.2, 22w17a, 22w19a, 1.19, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.5, 1.21
-
Confirmed
-
Mob behaviour
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:
- Summon a cat or ocelot and obtain some cooked cod or salmon.
- Attempt to tame the cat or ocelot using the cooked item.
- 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 Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
public class Cat extends TamableAnimal { ... private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON); ...
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.
... private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON, Items.COOKED_COD, Items.COOKED_SALMON); ...
... private static final Ingredient TEMPT_INGREDIENT = Ingredient.of(Items.COD, Items.SALMON, Items.COOKED_COD, Items.COOKED_SALMON); ...
- relates to
-
MC-142555 You cannot tempt or tame cats or ocelots using tropical fish
- Open