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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.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
    • Confirmed
    • Commands, Loot tables

      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 clovee can be found in this comment

            Unassigned Unassigned
            K_bai Kong Bai
            Votes:
            17 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: