Mojira Archive
MC-174435

Death loot table seed won't work with "/loot" command on mobs

The bug

The NBT tag of mobs DeathLootTableSeed can only affect the loot when the mob actually dies. However when you use "/loot kill" command on the mob, the loot is still random instead of fixed.

How to reproduce

  1. Summon a sheep with a certain loot table seed:
    /summon minecraft:sheep ~ ~ ~ {DeathLootTable:"minecraft:entities/sheep",DeathLootTableSeed:123}
  2. Kill it:
    /kill @e[sort=nearest,type=sheep,limit=1]
    

    → You will get exactly 2 piece of mutton.

  3. Summon the sheep again and use /loot command on it:
    /loot give @s kill @e[sort=nearest,type=sheep,limit=1]
    

    → You know how many mutton you get

Code Analysis

Code analysis by clove can be found in this comment

Unresolved

Kong Bai

2020-03-11, 06:01 AM

2024-10-16, 07:51 AM

17

5

Confirmed

Commands, Loot tables

/loot

1.15.2 - 1.21.11.15.2, 20w10a, 20w14a, 20w16a, 1.16.1, 1.16.2 Release Candidate 1, 20w49a, 21w03a, 21w37a, 1.19, 1.19.2, 1.20.2, 1.21.1

-