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

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 20w10a, 20w14a, 20w16a, 1.16.1, 1.16.2 Release Candidate 1, 20w49a, 21w03a, 21w37a
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      Commands, Loot tables

      Description

      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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            K_bai Kong Bai
            Votes:
            9 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: