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

Item drops from pandas aren't affected by the looting enchantment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.14.4, 19w34a, 19w35a, 1.16.4 Pre-release 1, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 20w48a, 20w49a, 21w03a, 1.16.5, 21w06a, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 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 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w38a, 21w39a, 21w41a, 21w43a, 1.18 Pre-release 1, 1.18, 1.18.1, 22w05a, 1.18.2, 22w17a, 1.19, 1.19.2, 22w43a, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.4, 23w51b, 1.20.6, 1.21, 1.21.3
    • Confirmed
    • Loot tables
    • Low
    • Gameplay

      The Bug:

      Item drops from pandas aren't affected by the looting enchantment.

      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[minecraft:enchantments={levels:{"minecraft:looting":100}}]
      2. Summon a panda.
      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 pandas 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.

      data > minecraft > loot_tables > entities > panda.json
      {
        "type": "minecraft:entity",
        "pools": [
          {
            "bonus_rolls": 0.0,
            "entries": [
              {
                "type": "minecraft:item",
                "functions": [
                  {
                    "add": false,
                    "count": 1.0,
                    "function": "minecraft:set_count"
                  }
                ],
                "name": "minecraft:bamboo"
              }
            ],
            "rolls": 1.0
          }
        ]
      }

      If we look at the above json file, 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 panda's loot table, therefore resulting in the drops of pandas not being affected by the looting enchantment.

        1. panda.json
          0.6 kB
        2. MC-160006.png
          MC-160006.png
          1.03 MB
        3. MC-160006.mp4
          2.63 MB

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            16 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: