Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-212795

Item drops from fish entities aren't affected by the looting enchantment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.5, 1.17, 1.17.1, 1.18.1, 1.18.2, 1.19 Pre-release 1, 1.19, 1.19.2, 1.19.4, 23w14a, 24w34a
    • Confirmed
    • Loot tables

      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:

      1. 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}]}
      2. Summon a cod, salmon, tropical fish, or pufferfish.
      3. Kill it using the sword enchanted with looting and observe the loot that it drops upon death.
      4. 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 Avoma 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.

        1. javbug.png
          javbug.png
          55 kB
        2. salmon.json
          1 kB
        3. MC-212795.mp4
          4.79 MB
        4. MC-212795.png
          MC-212795.png
          593 kB

            Unassigned Unassigned
            lextehgallade Lexi Smith
            Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              CHK: