mojira.dev
MC-160006

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

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={"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.

Linked issues

Attachments

Comments 7

Confirmed for 19w35a

Can confirm in 21w03a.

Can confirm in 21w06a.

Requesting ownership as the current report is inactive. I'm willing to keep this ticket updated and provide all of the necessary information.

Ownership given to Avoma as the original reporter's account has been deactivated

Should be forward-resolved to [MC-200707]

poweredbow

Avoma

(Unassigned)

Confirmed

Gameplay

Low

Loot tables

looting, panda

1.14.4, 19w34a, 19w35a, 1.16.4 Pre-release 1, 1.16.4 Release Candidate 1, ..., 1.21, 1.21.3, 1.21.4, 25w08a, 1.21.7

Retrieved