-
Bug
-
Resolution: Unresolved
-
None
-
1.16.3, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 21w07a, 21w08b, 21w13a, 21w15a, 21w16a, 1.17, 1.17.1, 1.18.2, 1.19.1, 1.19.2, 1.19.4, 23w14a, 1.20.1, 1.20.4, 23w51b, 24w20a, 1.21, 1.21.3, 1.21.4
-
Confirmed
-
Loot tables
The Bug:
Item drops from iron golems and cats aren't affected by the looting enchantment.
Steps to Reproduce:
- 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}}]
- Summon both an iron golem and a cat.
- Kill both of them using the sword enchanted with looting and observe the loot that they drop upon death.
- Take note as to whether or not item drops from iron golems and cats 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.
{ "type": "minecraft:entity", "pools": [ { "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", "functions": [ { "add": false, "count": { "type": "minecraft:uniform", "max": 2.0, "min": 0.0 }, "function": "minecraft:set_count" } ], "name": "minecraft:string" } ], "rolls": 1.0 } ] }
{ "type": "minecraft:entity", "pools": [ { "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", "functions": [ { "add": false, "count": { "type": "minecraft:uniform", "max": 2.0, "min": 0.0 }, "function": "minecraft:set_count" } ], "name": "minecraft:poppy" } ], "rolls": 1.0 }, { "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", "functions": [ { "add": false, "count": { "type": "minecraft:uniform", "max": 5.0, "min": 3.0 }, "function": "minecraft:set_count" } ], "name": "minecraft:iron_ingot" } ], "rolls": 1.0 } ] }
If we look at the above json files, 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 cat's or the iron golem's loot table, therefore resulting in the drops of cats and iron golems not being affected by the looting enchantment.
- relates to
-
MC-160006 Item drops from pandas aren't affected by the looting enchantment
- Open
-
MC-212795 Item drops from fish entities aren't affected by the looting enchantment
- Reopened
-
MCPE-175590 Item drops from iron golems and cats aren't affected by the looting enchantment
- Reopened