The Bug:
Item drops from fish entities aren't affected by the looting enchantment.
Just for clarification reasons, the affected entities are cod, salmon, tropical fish, and pufferfish.
Steps to Reproduce:
Give yourself a sword with a high level of looting by using the command provided below.
/give @s minecraft:diamond_sword{Enchantments:[{id:"minecraft:looting",lvl:100}]}
Summon a cod, salmon, tropical fish, or pufferfish.
Kill it using the sword enchanted with looting and observe the loot that it drops upon death.
Take note as to whether or not item drops from fish entities are affected by the looting enchantment.
Observed Behavior:
Item drops aren't affected by the looting enchantment.
Expected Behavior:
Item drops would be affected by the looting enchantment.
Code Analysis:
Code analysis by @unknown can be found below.
In the affected mob's json files (cod.json, salmon.json, tropical_fish.json, and pufferfish.json), we can see that the "minecraft:looting_enchant"
function (the function that's responsible for modifying the count of how many items are returned when an entity is killed by an item with the looting enchantment) isn't present anywhere within the affected mob's loot table, therefore resulting in the drops of cod, salmon, tropical fish, and pufferfish not being affected by the looting enchantment.
Linked issues
is duplicated by 1
relates to 2
Attachments
Comments 11
Code Analysis:
In the affected mob's json files (cod.json, salmon.json, tropical_fish.json, and pufferfish.json), we can see that the "minecraft:looting_enchant"
function (the function that's responsible for modifying the count of how many items are returned when an entity is killed by an item with the looting enchantment) isn't present anywhere within the affected mob's loot table, therefore resulting in the drops of cod, salmon, tropical fish, and pufferfish not being affected by the looting enchantment.
This is probably intentional. On an intuitive level, fish items look like whole fish, implying that a fish mob drops its entire body, so it doesn't make sense to get multiple fish from one. From a parity standpoint, I'm a Bedrock player and can confirm the "bug" on this edition too.
Additional: it has come to my attention that the behaviour of rabbits matches those of chickens in dropping one of itself unless looting is applied. This means that there is an in game trend of animals dropping one item has an exception allowing the drop of more than one only with looting. This further proves fish mobs have inconsistency and therefore bug like behaviour